Fix ripple clipping + quick rejection
bug:26524690
Don't intersect the first clip with the viewport. Instead, the first
clip op should always be a replace op.
Additionally, only quick reject nodes that clip to bounds, since some
nodes (like ripples) draw outside their own bounds.
Change-Id: I96a52029f360328aba19af7349888cc0a026b5b1
diff --git a/libs/hwui/FrameBuilder.cpp b/libs/hwui/FrameBuilder.cpp
index a457212..1c765f6 100644
--- a/libs/hwui/FrameBuilder.cpp
+++ b/libs/hwui/FrameBuilder.cpp
@@ -208,7 +208,9 @@
mCanvasState.setClippingOutline(mAllocator, &(properties.getOutline()));
}
- if (!mCanvasState.quickRejectConservative(0, 0, width, height)) {
+ bool quickRejected = properties.getClipToBounds()
+ && mCanvasState.quickRejectConservative(0, 0, width, height);
+ if (!quickRejected) {
// not rejected, so defer render as either Layer, or direct (possibly wrapped in saveLayer)
if (node.getLayer()) {
// HW layer