Bug 1539732 - Release unnecessary GeckoSurfaceTexture resource at RenderCompositorEGL r=jnicol

Bug 1416015 and Bug 1470348 added function calls for CompositorOGL. Similar things needs to be done for RenderCompositorEGL.

Differential Revision: https://phabricator.services.mozilla.com/D25199

--HG--
extra : moz-landing-system : lando
This commit is contained in:
sotaro 2019-03-29 14:36:05 +00:00
Родитель aa4c004b0f
Коммит 2f9999a07a
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -19,6 +19,10 @@
# include <gdk/gdkx.h>
#endif
#ifdef MOZ_WIDGET_ANDROID
# include "GeneratedJNIWrappers.h"
#endif
namespace mozilla {
namespace wr {
@ -104,6 +108,10 @@ bool RenderCompositorEGL::BeginFrame() {
return false;
}
#ifdef MOZ_WIDGET_ANDROID
java::GeckoSurfaceTexture::DestroyUnused((int64_t)gl());
#endif
return true;
}
@ -117,6 +125,8 @@ void RenderCompositorEGL::WaitForGPU() {}
void RenderCompositorEGL::Pause() {
#ifdef MOZ_WIDGET_ANDROID
java::GeckoSurfaceTexture::DestroyUnused((int64_t)gl());
java::GeckoSurfaceTexture::DetachAllFromGLContext((int64_t)gl());
DestroyEGLSurface();
#endif
}