diff options
author | Wei Zou <wzou@codeaurora.org> | 2012-11-05 21:48:42 -0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2013-05-17 12:19:01 -0700 |
commit | 00dc95ffbfa8415cc661192c4f695493af4625c1 (patch) | |
tree | 10347a583dcea137a0bc7890732a342f2b64a21f /libs | |
parent | 0043015c0dc6400f47edd4124b1dfb5881be3c8a (diff) | |
download | frameworks_base-00dc95ffbfa8415cc661192c4f695493af4625c1.zip frameworks_base-00dc95ffbfa8415cc661192c4f695493af4625c1.tar.gz frameworks_base-00dc95ffbfa8415cc661192c4f695493af4625c1.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
Remove opaque check in preparing dirty region
Since preserve swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new process. This prevents
garbage being present from the previous process in the color buffer.
CRs-Fixed: 465346
Change-Id: I98f2009748244751c4b56af8afbdfeb645c13230
Diffstat (limited to 'libs')
-rwxr-xr-x[-rw-r--r--] | libs/hwui/OpenGLRenderer.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index bc30738..7309e46 100644..100755 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -208,6 +208,20 @@ 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(); + return DrawGlInfo::kStatusDone; + } + else + { + return DrawGlInfo::kStatusDrew; + } +#else if (!opaque) { mCaches.enableScissor(); mCaches.setScissor(left, mSnapshot->height - bottom, right - left, bottom - top); @@ -217,6 +231,7 @@ status_t OpenGLRenderer::clear(float left, float top, float right, float bottom, mCaches.resetScissor(); return DrawGlInfo::kStatusDone; +#endif } void OpenGLRenderer::syncState() { |