Only use analytic effect-based clipping when AA is required by at least one element.
BUG=352718
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/204983003
git-svn-id: http://skia.googlecode.com/svn/trunk@13867 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/expectations/gm/ignored-tests.txt b/expectations/gm/ignored-tests.txt
index d63d980..4e64770 100644
--- a/expectations/gm/ignored-tests.txt
+++ b/expectations/gm/ignored-tests.txt
@@ -47,6 +47,10 @@
rrect_clip_bw
rrect_clip_aa
+# bsalomon: This test changed imperceptibly on my windows laptop with an intel gpu
+# https://codereview.chromium.org/204983003/
+filltypespersp
+
# reed: https://codereview.chromium.org/190723004/
# This change removes an API that this GM was testing. If/when it lands and sticks,
# I will likely just delete the GM.
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 96f4b20..2f60c45 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -268,7 +268,7 @@
SkVector clipToRTOffset = { SkIntToScalar(-clipDataIn->fOrigin.fX),
SkIntToScalar(-clipDataIn->fOrigin.fY) };
if (elements.isEmpty() ||
- this->installClipEffects(elements, are, clipToRTOffset, devBounds)) {
+ (requiresAA && this->installClipEffects(elements, are, clipToRTOffset, devBounds))) {
SkIRect scissorSpaceIBounds(clipSpaceIBounds);
scissorSpaceIBounds.offset(-clipDataIn->fOrigin);
if (NULL == devBounds ||