summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/source/src/java/org/mozilla/gecko/gfx/GLController.java18
1 files changed, 6 insertions, 12 deletions
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
index 2c503ab8b302..57ec2589b857 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
@@ -28,8 +28,6 @@ public class GLController {
private EGLContext mEGLContext;
private EGLSurface mEGLSurface;
- private GL mGL;
-
private static final int LOCAL_EGL_OPENGL_ES2_BIT = 4;
private static final int[] CONFIG_SPEC = {
@@ -82,7 +80,6 @@ public class GLController {
getEGLError());
}
- mGL = null;
mEGLContext = null;
}
}
@@ -111,7 +108,6 @@ public class GLController {
mEGLConfig = null;
mEGLContext = null;
mEGLSurface = null;
- mGL = null;
return true;
}
public synchronized int getWidth() {
@@ -159,11 +155,10 @@ public class GLController {
getEGLError());
}
- mGL = mEGLContext.getGL();
-
if (mView.getRenderer() != null) {
- mView.getRenderer().onSurfaceCreated((GL10)mGL, mEGLConfig);
- mView.getRenderer().onSurfaceChanged((GL10)mGL, mWidth, mHeight);
+ GL10 gl = (GL10) mEGLContext.getGL();
+ mView.getRenderer().onSurfaceCreated(gl, mEGLConfig);
+ mView.getRenderer().onSurfaceChanged(gl, mWidth, mHeight);
}
}
@@ -208,11 +203,10 @@ public class GLController {
"surface! " + getEGLError());
}
- mGL = mEGLContext.getGL();
-
if (mView.getRenderer() != null) {
- mView.getRenderer().onSurfaceCreated((GL10)mGL, mEGLConfig);
- mView.getRenderer().onSurfaceChanged((GL10)mGL, mView.getWidth(), mView.getHeight());
+ GL10 gl = (GL10) mEGLContext.getGL();
+ mView.getRenderer().onSurfaceCreated(gl, mEGLConfig);
+ mView.getRenderer().onSurfaceChanged(gl, mView.getWidth(), mView.getHeight());
}
}