Bug 763175 - Only create a new EGL surface when a new Android surface is created. r=BenWa

This commit is contained in:
Ali Juma 2012-06-12 10:24:31 -04:00
parent cf8f8a0d31
commit 50551e14c0
2 changed files with 10 additions and 7 deletions

View File

@ -436,16 +436,17 @@ public:
#else
virtual bool
RenewSurface() {
ReleaseSurface();
EGLConfig config;
sEGLLibrary.fMakeCurrent(EGL_DISPLAY(), EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT);
if (!mSurface) {
#ifdef MOZ_JAVA_COMPOSITOR
mSurface = mozilla::AndroidBridge::Bridge()->ProvideEGLSurface();
mSurface = mozilla::AndroidBridge::Bridge()->ProvideEGLSurface();
#else
CreateConfig(&config);
mSurface = CreateSurfaceForWindow(NULL, config);
EGLConfig config;
CreateConfig(&config);
mSurface = CreateSurfaceForWindow(NULL, config);
#endif
}
return sEGLLibrary.fMakeCurrent(EGL_DISPLAY(),
mSurface, mSurface,
mContext);

View File

@ -143,6 +143,8 @@ CompositorParent::ResumeComposition()
static_cast<LayerManagerOGL*>(mLayerManager.get())->gl()->RenewSurface();
#endif
Composite();
// if anyone's waiting to make sure that composition really got resumed, tell them
lock.NotifyAll();
}