From ce483cb074362cec6d744141b34ac397c75dc1e0 Mon Sep 17 00:00:00 2001 From: Rajulu Ponnada Date: Tue, 22 May 2012 12:43:01 -0700 Subject: [PATCH] hardware/qcom/display: Fixes corrupted display when using whith zero dirtyregion An empty dirty region, which initiates tile rendering (non-preserved with full viewport) but with no updates from the view hierarchy leading to uninitialized content on the screen CR's Fixed:357662 (cherry picked from commit 66ceabd31fcd49c344b468a138438fe3d226f515) Change-Id: Ieaa357ee2951aa8286ab1fe0f96b3d99bc424a3b --- libtilerenderer/tilerenderer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libtilerenderer/tilerenderer.cpp b/libtilerenderer/tilerenderer.cpp index 6e8f847..0fc4919 100644 --- a/libtilerenderer/tilerenderer.cpp +++ b/libtilerenderer/tilerenderer.cpp @@ -38,6 +38,7 @@ void TileRenderer::startTileRendering(OpenGLRenderer* renderer, int width = 0; int height = 0; GLenum status = GL_NO_ERROR; + int preserve = 0; if (renderer != NULL) { renderer->getViewport(width, height); @@ -48,6 +49,7 @@ void TileRenderer::startTileRendering(OpenGLRenderer* renderer, top = 0; right = width; bottom = height; + preserve = 1; } if (!left && !right && !top && !bottom) { @@ -56,7 +58,7 @@ void TileRenderer::startTileRendering(OpenGLRenderer* renderer, return; } - int l = left, t = (height - bottom), w = (right - left), h = (bottom - top), preserve = 0; + int l = left, t = (height - bottom), w = (right - left), h = (bottom - top); if (l < 0 || t < 0) { l = (l < 0) ? 0 : l;