Better handle op size edge cases
bug:9464358
Previously, empty and unknown sized ops are assumed to fully cover
their clip. This is now corrected such that empty sized ops are
pre-rejected before defer. Additionally, unknown sized ops disable
overdraw avoidance.
Change-Id: Icf2ce24f98be5ea6299e24ffcf826790373564a1
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 05f43a9..ed6498f 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1395,9 +1395,9 @@
}
state.mBounds.set(clippedBounds);
} else {
- // If we don't have bounds, let's assume we're clipped
- // to prevent merging
- state.mClipSideFlags = kClipSide_Full;
+ // Empty bounds implies size unknown. Label op as conservatively clipped to disable
+ // overdraw avoidance (since we don't know what it overlaps)
+ state.mClipSideFlags = kClipSide_ConservativeFull;
state.mBounds.set(currentClip);
}
}