summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorWei Zou <wzou@codeaurora.org>2012-11-05 21:48:42 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2013-03-31 05:15:29 -0700
commit313336ebbbdf256aabb3198f9294b447946bd01b (patch)
tree6d1ff0a8af7dc02ea9395afaf83930f4ab168e13 /libs
parent6a33b50cc989e75c70c4f9eea4fd92f1d10dacd7 (diff)
downloadframeworks_base-313336ebbbdf256aabb3198f9294b447946bd01b.zip
frameworks_base-313336ebbbdf256aabb3198f9294b447946bd01b.tar.gz
frameworks_base-313336ebbbdf256aabb3198f9294b447946bd01b.tar.bz2
Remove opaque check in GLRenderer when preparing dirty region.
Since preserved swap is enabled, we need to clear the color buffer when the scissor rect is prepared for a new process. This prevents garbage to be present from the previous process in the color buffer. CRs-Fixed: 391492, 403067, 405916 Change-Id: I1f72a3dee2f5d58a984f4cd367c9f7bf08ab9d6a Conflicts: libs/hwui/OpenGLRenderer.cpp [PATCH] Remove opaque check in preparing dirty region Since preserved swap is enabled, we need to clear the color buffer when the scissor rect is prepared for a new rocess. This prevents garbage to be present from the previous process in the color buffer. (cherry picked from commit 2b5e584e2615852b68a69bb529c6926190246b64) Change-Id: I92a4fa35e0746f12fcd736e21fd30d9c4b644a8a CRs-Fixed: 391492, 403067, 405916 Conflicts: libs/hwui/OpenGLRenderer.cpp Enable scissor when preparing dirty rect that is opaque Now enabling scissor before setting it in the opaque case, previously was not doing so. Change-Id: I1ea904cf01603096e423556090564291ab712d36 CRs-Fixed: 465346 Depends-on: 278453
Diffstat (limited to 'libs')
-rwxr-xr-x[-rw-r--r--]libs/hwui/OpenGLRenderer.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index bc30738..d8bf85c 100644..100755
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -208,14 +208,22 @@ status_t OpenGLRenderer::prepareDirty(float left, float top, float right, float
}
status_t OpenGLRenderer::clear(float left, float top, float right, float bottom, bool opaque) {
+#ifdef QCOM_HARDWARE
+ mCaches.enableScissor();
+ mCaches.setScissor(left, mSnapshot->height - bottom, right - left, bottom - top);
+ glClear(GL_COLOR_BUFFER_BIT);
+ if(opaque)
+ mCaches.resetScissor();
+#else
if (!opaque) {
mCaches.enableScissor();
mCaches.setScissor(left, mSnapshot->height - bottom, right - left, bottom - top);
glClear(GL_COLOR_BUFFER_BIT);
return DrawGlInfo::kStatusDrew;
}
-
mCaches.resetScissor();
+#endif
+
return DrawGlInfo::kStatusDone;
}