diff options
| author | Chih-Chung Chang <chihchung@google.com> | 2012-04-25 02:03:00 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-04-25 02:03:00 -0700 |
| commit | 08d886617e5eb6e8bc3d422972dedbfbea5ca564 (patch) | |
| tree | d2f68acd03c4eb664aeec309960860b63a372c3c | |
| parent | a11f19872b6059d97d31c047ac752354670e1267 (diff) | |
| parent | 57d3cb26a80cdf6b20b2185b02ebf07f3bc2592c (diff) | |
| download | android_packages_apps_Gallery2-08d886617e5eb6e8bc3d422972dedbfbea5ca564.tar.gz android_packages_apps_Gallery2-08d886617e5eb6e8bc3d422972dedbfbea5ca564.tar.bz2 android_packages_apps_Gallery2-08d886617e5eb6e8bc3d422972dedbfbea5ca564.zip | |
Merge "Remove scissor tests."
| -rw-r--r-- | src/com/android/gallery3d/ui/GLCanvasImpl.java | 3 | ||||
| -rw-r--r-- | src/com/android/gallery3d/ui/GLRootView.java | 15 | ||||
| -rw-r--r-- | src/com/android/gallery3d/ui/Raw2DTexture.java | 3 |
3 files changed, 0 insertions, 21 deletions
diff --git a/src/com/android/gallery3d/ui/GLCanvasImpl.java b/src/com/android/gallery3d/ui/GLCanvasImpl.java index f822951c7..61238519b 100644 --- a/src/com/android/gallery3d/ui/GLCanvasImpl.java +++ b/src/com/android/gallery3d/ui/GLCanvasImpl.java @@ -105,8 +105,6 @@ public class GLCanvasImpl implements GLCanvas { Matrix.setIdentityM(matrix, 0); Matrix.translateM(matrix, 0, 0, mHeight, 0); Matrix.scaleM(matrix, 0, 1, -1, 1); - - gl.glScissor(0, 0, width, height); } public void setAlpha(float alpha) { @@ -533,7 +531,6 @@ public class GLCanvasImpl implements GLCanvas { // Enable used features gl.glEnable(GL11.GL_DITHER); - gl.glEnable(GL11.GL_SCISSOR_TEST); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY); diff --git a/src/com/android/gallery3d/ui/GLRootView.java b/src/com/android/gallery3d/ui/GLRootView.java index 0268ef95d..f98f9a829 100644 --- a/src/com/android/gallery3d/ui/GLRootView.java +++ b/src/com/android/gallery3d/ui/GLRootView.java @@ -73,9 +73,6 @@ public class GLRootView extends GLSurfaceView private int mFlags = FLAG_NEED_LAYOUT; private volatile boolean mRenderRequested = false; - private Rect mClipRect = new Rect(); - private int mClipRetryCount = 0; - private final GalleryEGLConfigChooser mEglConfigChooser = new GalleryEGLConfigChooser(); @@ -234,9 +231,6 @@ public class GLRootView extends GLSurfaceView Utils.assertTrue(mGL == gl); mCanvas.setSize(width, height); - - mClipRect.set(0, 0, width, height); - mClipRetryCount = 2; } private void outputFps() { @@ -296,15 +290,6 @@ public class GLRootView extends GLSurfaceView if ((mFlags & FLAG_NEED_LAYOUT) != 0) layoutContentPane(); - // OpenGL seems having a bug causing us not being able to reset the - // scissor box in "onSurfaceChanged()". We have to do it in the second - // onDrawFrame(). - if (mClipRetryCount > 0) { - --mClipRetryCount; - Rect clip = mClipRect; - gl.glScissor(clip.left, clip.top, clip.width(), clip.height()); - } - if (mContentView != null) { mContentView.render(mCanvas); } diff --git a/src/com/android/gallery3d/ui/Raw2DTexture.java b/src/com/android/gallery3d/ui/Raw2DTexture.java index c23bf94cb..b7e4e6d59 100644 --- a/src/com/android/gallery3d/ui/Raw2DTexture.java +++ b/src/com/android/gallery3d/ui/Raw2DTexture.java @@ -61,8 +61,6 @@ public class Raw2DTexture extends BasicTexture { gl11.glBindTexture(src.getTarget(), src.getId()); boolean targetEnabled = gl11.glIsEnabled(src.getTarget()); gl11.glEnable(src.getTarget()); - boolean scissorEnabled = gl11.glIsEnabled(GL11.GL_SCISSOR_TEST); - gl11.glDisable(GL11.GL_SCISSOR_TEST); // Set the texture matrix. gl11.glMatrixMode(GL11.GL_TEXTURE); @@ -89,7 +87,6 @@ public class Raw2DTexture extends BasicTexture { // Clear. if (!targetEnabled) gl11.glDisable(src.getTarget()); - if (scissorEnabled) gl11.glEnable(GL11.GL_SCISSOR_TEST); gl11ep.glBindFramebufferOES(GL11ExtensionPack.GL_FRAMEBUFFER_OES, 0); gl11.glBindTexture(src.getTarget(), 0); gl11.glViewport(viewPort[0], viewPort[1], viewPort[2], viewPort[3]); |
