mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 14:15:30 +00:00
Bug 785597 - Remove a bunch of unused code. r=snorp
This commit is contained in:
parent
fbf5889d74
commit
f1ed178242
@ -6,7 +6,6 @@
|
||||
package org.mozilla.gecko.gfx;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGL11;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLContext;
|
||||
import javax.microedition.khronos.egl.EGLDisplay;
|
||||
@ -24,7 +23,6 @@ public class GLController {
|
||||
private EGL10 mEGL;
|
||||
private EGLDisplay mEGLDisplay;
|
||||
private EGLConfig mEGLConfig;
|
||||
private EGLSurface mEGLSurface;
|
||||
|
||||
private static final int LOCAL_EGL_OPENGL_ES2_BIT = 4;
|
||||
|
||||
@ -37,42 +35,19 @@ public class GLController {
|
||||
EGL10.EGL_NONE
|
||||
};
|
||||
|
||||
public GLController(LayerView view) {
|
||||
GLController(LayerView view) {
|
||||
mView = view;
|
||||
mGLVersion = 2;
|
||||
mSurfaceValid = false;
|
||||
}
|
||||
|
||||
public void setGLVersion(int version) {
|
||||
/* This function is invoked by JNI */
|
||||
void setGLVersion(int version) {
|
||||
mGLVersion = version;
|
||||
}
|
||||
|
||||
public EGLDisplay getEGLDisplay() { return mEGLDisplay; }
|
||||
public EGLConfig getEGLConfig() { return mEGLConfig; }
|
||||
public EGLSurface getEGLSurface() { return mEGLSurface; }
|
||||
public LayerView getView() { return mView; }
|
||||
|
||||
public boolean hasSurface() {
|
||||
return mEGLSurface != null;
|
||||
}
|
||||
|
||||
public boolean swapBuffers() {
|
||||
return mEGL.eglSwapBuffers(mEGLDisplay, mEGLSurface);
|
||||
}
|
||||
|
||||
public boolean checkForLostContext() {
|
||||
if (mEGL.eglGetError() != EGL11.EGL_CONTEXT_LOST) {
|
||||
return false;
|
||||
}
|
||||
|
||||
mEGLDisplay = null;
|
||||
mEGLConfig = null;
|
||||
mEGLSurface = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
// This function is invoked by JNI
|
||||
public void resumeCompositorIfValid() {
|
||||
/* This function is invoked by JNI */
|
||||
void resumeCompositorIfValid() {
|
||||
synchronized (this) {
|
||||
if (!mSurfaceValid) {
|
||||
return;
|
||||
@ -81,9 +56,10 @@ public class GLController {
|
||||
mView.getListener().compositionResumeRequested(mWidth, mHeight);
|
||||
}
|
||||
|
||||
// Wait until we are allowed to use EGL functions on the Surface backing
|
||||
// this window. This function is invoked by JNI
|
||||
public synchronized void waitForValidSurface() {
|
||||
/* Wait until we are allowed to use EGL functions on the Surface backing
|
||||
* this window.
|
||||
* This function is invoked by JNI */
|
||||
synchronized void waitForValidSurface() {
|
||||
while (!mSurfaceValid) {
|
||||
try {
|
||||
wait();
|
||||
@ -93,14 +69,6 @@ public class GLController {
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int getWidth() {
|
||||
return mWidth;
|
||||
}
|
||||
|
||||
public synchronized int getHeight() {
|
||||
return mHeight;
|
||||
}
|
||||
|
||||
synchronized void surfaceDestroyed() {
|
||||
mSurfaceValid = false;
|
||||
notifyAll();
|
||||
@ -164,7 +132,7 @@ public class GLController {
|
||||
* Provides an EGLSurface without assuming ownership of this surface.
|
||||
* This class does not keep a reference to the provided EGL surface; the
|
||||
* caller assumes ownership of the surface once it is returned.
|
||||
*/
|
||||
* This function is invoked by JNI */
|
||||
private EGLSurface provideEGLSurface() {
|
||||
if (mEGL == null) {
|
||||
initEGL();
|
||||
|
Loading…
Reference in New Issue
Block a user