From 62f7114719d2009dca7dd120f0fe29a24bd77a40 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 26 Oct 2011 15:11:59 -0700 Subject: [PATCH] fix Corrupted graphics while playing You Tube on orientation change Bug: 5432124 Change-Id: If948b9797b1ec6fff80ca5ea94508abcaced9f31 --- services/surfaceflinger/SurfaceFlinger.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index e869ba259..a6d4147c1 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1784,8 +1784,10 @@ status_t SurfaceFlinger::renderScreenToTextureLocked(DisplayID dpy, // redraw the screen entirely... glDisable(GL_TEXTURE_EXTERNAL_OES); glDisable(GL_TEXTURE_2D); + glDisable(GL_SCISSOR_TEST); glClearColor(0,0,0,1); glClear(GL_COLOR_BUFFER_BIT); + glEnable(GL_SCISSOR_TEST); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); const Vector< sp >& layers(mVisibleLayersSortedByZ);