summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 dcd8d3e..0c3a81b 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -471,12 +471,14 @@ status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) {
info.height = getSnapshot()->height;
getSnapshot()->transform->copyTo(&info.transform[0]);
+ bool dirtyClip = mDirtyClip;
// setup GL state for functor
if (mDirtyClip) {
- setScissorFromClip();
setStencilFromClip(); // can issue draws, so must precede enableScissor()/interrupt()
}
- mCaches.enableScissor();
+ if (mCaches.enableScissor() || dirtyClip) {
+ setScissorFromClip();
+ }
interrupt();
// call functor immediately after GL state setup