summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2011-11-28 11:53:21 -0800
committerChet Haase <chet@google.com>2011-11-28 15:19:22 -0800
commit08837c246c9c27902c59b41c8661c2f27a4aa2bc (patch)
treeef44ddbbbe0ffe253fff53baa2701d8c747db570 /libs/hwui
parent425c595acb798ed9652b5a1f0e5412cbd8e3873d (diff)
downloadframeworks_base-08837c246c9c27902c59b41c8661c2f27a4aa2bc.zip
frameworks_base-08837c246c9c27902c59b41c8661c2f27a4aa2bc.tar.gz
frameworks_base-08837c246c9c27902c59b41c8661c2f27a4aa2bc.tar.bz2
Fix flashing wifi dialog after rotating back from landscape.
There was an error in some of the OpenGL layer logic such that we would occasionally set up a layer for rendering and then not clean up when it was done. This caused future OpenGL rendering to go into that layer instead of to the buffers being displayed on the screen, resulting in artifacts including flashes and displaying of stale content. This happened specifically when using the wifi settings dialog with the InputMethod keyboard displayed, but it was probably visible in other situations as well. Issue #5628248: Flickering/flashing after entering password for WiFi Change-Id: I38139f620b310f4309570fa7224552d2ee633999
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 7561a47..4d22646 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -201,14 +201,16 @@ void OpenGLRenderer::interrupt() {
}
void OpenGLRenderer::resume() {
- glViewport(0, 0, mSnapshot->viewport.getWidth(), mSnapshot->viewport.getHeight());
+ sp<Snapshot> snapshot = (mSnapshot != NULL) ? mSnapshot : mFirstSnapshot;
+
+ glViewport(0, 0, snapshot->viewport.getWidth(), snapshot->viewport.getHeight());
glEnable(GL_SCISSOR_TEST);
dirtyClip();
glDisable(GL_DITHER);
- glBindFramebuffer(GL_FRAMEBUFFER, mSnapshot->fbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, snapshot->fbo);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
mCaches.blend = true;