From 8025061c594e5171e1bf370d8fdd77e0e9a02b47 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Wed, 15 Aug 2012 13:46:54 -0700 Subject: Restore scissor state correctly Chrome is disabling the scissor, which doesn't play well with our code that assumes that we know the state of the scissor. This fix sets up our internal state based on the actual state of the scissor in the resume() function (which is called after any calls out to the Chrome or Browser GL functor). This fixes intermittent rendering artifacts, including a gray address bar (where the gray background gets painted without the clip that is being applied to the text foreground). Issue #6886339 Address bar in Chrome turns gray after swiping the tabs / favicons drift outside of tab Change-Id: I3d8a23f4438b41a367336507845baaea90cccc7e --- libs/hwui/OpenGLRenderer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/hwui/OpenGLRenderer.cpp') diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 663923197f84..849c5563c4da 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -250,6 +250,7 @@ void OpenGLRenderer::resume() { glViewport(0, 0, snapshot->viewport.getWidth(), snapshot->viewport.getHeight()); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + mCaches.scissorEnabled = glIsEnabled(GL_SCISSOR_TEST); mCaches.enableScissor(); mCaches.resetScissor(); dirtyClip(); -- cgit v1.2.3-59-g8ed1b