From 8eaba5acf30cbdc851811375a8d385d20110cdd4 Mon Sep 17 00:00:00 2001 From: Rama Vaddula Date: Wed, 25 Sep 2013 15:55:25 -0700 Subject: 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: 549755 Change-Id: Icd12ae388077b8c9ed329c37314e896500078543 --- libs/hwui/OpenGLRenderer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libs/hwui') diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 9621b54..c5e709e 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -181,6 +181,16 @@ void OpenGLRenderer::discardFramebuffer(float left, float top, float right, floa } void OpenGLRenderer::clear(float left, float top, float right, float bottom, bool opaque) { +#ifdef QCOM_BSP_LEGACY + mRenderState.scissor().setEnabled(true); + mRenderState.scissor().set(left, getViewportHeight() - bottom, right - left, bottom - top); + glClear(GL_COLOR_BUFFER_BIT); + mDirty = true; + if (opaque) { + mRenderState.scissor().reset(); + return; + } +#else if (!opaque) { mRenderState.scissor().setEnabled(true); mRenderState.scissor().set(left, getViewportHeight() - bottom, right - left, bottom - top); @@ -190,6 +200,7 @@ void OpenGLRenderer::clear(float left, float top, float right, float bottom, boo } mRenderState.scissor().reset(); +#endif } void OpenGLRenderer::startTilingCurrentClip(bool opaque, bool expand) { -- cgit v1.1