Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57d3cb26 authored by Chih-Chung Chang's avatar Chih-Chung Chang
Browse files

Remove scissor tests.

Change-Id: I9f2c462a251e518ce5954dde0eb6e509734254c4
parent 160e6d77
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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);
+0 −15
Original line number Diff line number Diff line
@@ -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);
        }
+0 −3
Original line number Diff line number Diff line
@@ -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]);