Index: src/gpu/GrClipStackClip.cpp |
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp |
index 7138f4b68a1d42bf6211b2a9f1dd36adf556a494..d0a9d66c22b97a3b73a47e04b2363dc3950e978e 100644 |
--- a/src/gpu/GrClipStackClip.cpp |
+++ b/src/gpu/GrClipStackClip.cpp |
@@ -41,6 +41,27 @@ bool GrClipStackClip::quickContains(const SkRRect& rrect) const { |
SkIntToScalar(fOrigin.fY))); |
} |
+bool GrClipStackClip::isRRect(const SkRect& origRTBounds, SkRRect* rr, bool* aa) const { |
+ if (!fStack) { |
+ return false; |
+ } |
+ const SkRect* rtBounds = &origRTBounds; |
+ SkRect tempRTBounds; |
+ bool origin = fOrigin.fX || fOrigin.fY; |
+ if (origin) { |
+ tempRTBounds = origRTBounds; |
+ tempRTBounds.offset(fOrigin.fX, fOrigin.fY); |
+ rtBounds = &tempRTBounds; |
+ } |
+ if (fStack->isRRect(*rtBounds, rr, aa)) { |
+ if (origin) { |
+ rr->offset(-fOrigin.fX, -fOrigin.fY); |
+ } |
+ return true; |
+ } |
+ return false; |
+} |
+ |
void GrClipStackClip::getConservativeBounds(int width, int height, SkIRect* devResult, |
bool* isIntersectionOfRects) const { |
if (!fStack) { |