Bug 834243 - defer updateCompositor to a runnable on the LayerView in hope that it avoids subsequent EGLSurface creation failures - r=kats

This commit is contained in:
Benoit Jacob
2013-11-18 17:57:47 -05:00
parent a9fff2a44d
commit ce3a12f80f

View File

@@ -102,7 +102,17 @@ public class GLController {
mWidth = newWidth;
mHeight = newHeight;
updateCompositor();
// we defer to a runnable the task of updating the compositor, because this is going to
// call back into createEGLSurfaceForCompositor, which will try to create an EGLSurface
// against mView, which we suspect might fail if called too early. By posting this to
// mView, we hope to ensure that it is deferred until mView is actually "ready" for some
// sense of "ready".
mView.post(new Runnable() {
@Override
public void run() {
updateCompositor();
}
});
}
void updateCompositor() {