diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2023-11-08 17:37:06 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-11-09 07:55:32 +0100 |
commit | b6e5a8d60b8c63983000b41711941dc1c5b38102 (patch) | |
tree | efb80f2cc19f67c24eefbc975554cb79cdecafec /android | |
parent | e4a56c1996aeba2b7a8b022833198f2a6086eb17 (diff) |
android: Use local var instead of 'mGL' member
It's never used except where it's also previously
assigned, so use a local variable instead.
Even the getter `GLController#getGL` gets
it from the EGLContext instead of using the
member.
Change-Id: Icec909f6e3e508a16fb455e81474bb336dc09362
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159181
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'android')
-rw-r--r-- | android/source/src/java/org/mozilla/gecko/gfx/GLController.java | 18 |
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()); } } |