Disable shadow overdraw avoidance in the inverse clip case
The caster is effectivly transparent, so skip the optimization just as
is done for alpha < 1.0
Change-Id: I3d294222adf0137e20c1fb5808313d487e92e0a8
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index d808735..619f331 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -3203,7 +3203,7 @@
}
status_t OpenGLRenderer::drawShadow(const mat4& casterTransformXY, const mat4& casterTransformZ,
- float casterAlpha, const SkPath* casterPerimeter) {
+ float casterAlpha, bool casterUnclipped, const SkPath* casterPerimeter) {
if (currentSnapshot()->isIgnored()) return DrawGlInfo::kStatusDone;
// TODO: use quickRejectWithScissor. For now, always force enable scissor.
@@ -3260,7 +3260,7 @@
Rect casterBounds(casterPerimeter->getBounds());
casterTransformXY.mapRect(casterBounds);
- bool isCasterOpaque = (casterAlpha == 1.0f);
+ bool isCasterOpaque = (casterAlpha == 1.0f) && casterUnclipped;
// draw caster's shadows
if (mCaches.propertyAmbientShadowStrength > 0) {
paint.setARGB(casterAlpha * mCaches.propertyAmbientShadowStrength, 0, 0, 0);