Skip to content

Commit 8025061

Browse files
committed
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
1 parent 978f853 commit 8025061

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libs/hwui/OpenGLRenderer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ void OpenGLRenderer::resume() {
250250
glViewport(0, 0, snapshot->viewport.getWidth(), snapshot->viewport.getHeight());
251251
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
252252

253+
mCaches.scissorEnabled = glIsEnabled(GL_SCISSOR_TEST);
253254
mCaches.enableScissor();
254255
mCaches.resetScissor();
255256
dirtyClip();

0 commit comments

Comments
 (0)