зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 763bcda2802f (bug 834243) for Android bustage on a CLOSED TREE
This commit is contained in:
Родитель
93c960dab0
Коммит
0ad19cee88
|
@ -46,7 +46,6 @@ public class GLController {
|
|||
private EGL10 mEGL;
|
||||
private EGLDisplay mEGLDisplay;
|
||||
private EGLConfig mEGLConfig;
|
||||
private EGLSurface mEGLSurfaceForCompositor;
|
||||
|
||||
private static final int LOCAL_EGL_OPENGL_ES2_BIT = 4;
|
||||
|
||||
|
@ -85,11 +84,6 @@ public class GLController {
|
|||
|
||||
mServerSurfaceValid = false;
|
||||
|
||||
if (mEGLSurfaceForCompositor != null) {
|
||||
mEGL.eglDestroySurface(mEGLDisplay, mEGLSurfaceForCompositor);
|
||||
mEGLSurfaceForCompositor = null;
|
||||
}
|
||||
|
||||
// We need to coordinate with Gecko when pausing composition, to ensure
|
||||
// that Gecko never executes a draw event while the compositor is paused.
|
||||
// This is sent synchronously to make sure that we don't attempt to use
|
||||
|
@ -138,10 +132,6 @@ public class GLController {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!AttemptPreallocateEGLSurfaceForCompositor()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only try to create the compositor if we have a valid surface and gecko is up. When these
|
||||
// two conditions are satisfied, we can be relatively sure that the compositor creation will
|
||||
// happen without needing to block anyhwere. Do it with a sync gecko event so that the
|
||||
|
@ -225,21 +215,11 @@ public class GLController {
|
|||
throw new GLControllerException("No suitable EGL configuration found");
|
||||
}
|
||||
|
||||
private synchronized boolean AttemptPreallocateEGLSurfaceForCompositor() {
|
||||
if (mEGLSurfaceForCompositor == null) {
|
||||
initEGL();
|
||||
mEGLSurfaceForCompositor = mEGL.eglCreateWindowSurface(mEGLDisplay, mEGLConfig, mView.getNativeWindow(), null);
|
||||
}
|
||||
return mEGLSurfaceForCompositor != null;
|
||||
}
|
||||
|
||||
@GeneratableAndroidBridgeTarget(allowMultithread = true, stubName = "CreateEGLSurfaceForCompositorWrapper")
|
||||
private synchronized EGLSurface createEGLSurfaceForCompositor() {
|
||||
AttemptPreallocateEGLSurfaceForCompositor();
|
||||
EGLSurface result = mEGLSurfaceForCompositor;
|
||||
mEGLSurfaceForCompositor = null;
|
||||
return result;
|
||||
}
|
||||
private EGLSurface createEGLSurfaceForCompositor() {
|
||||
initEGL();
|
||||
return mEGL.eglCreateWindowSurface(mEGLDisplay, mEGLConfig, mView.getNativeWindow(), null);
|
||||
}
|
||||
|
||||
private String getEGLError() {
|
||||
return "Error " + (mEGL == null ? "(no mEGL)" : mEGL.eglGetError());
|
||||
|
|
Загрузка…
Ссылка в новой задаче