aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrFixedClip.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrFixedClip.h')
-rw-r--r--src/gpu/GrFixedClip.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gpu/GrFixedClip.h b/src/gpu/GrFixedClip.h
index 01498c1161..705b2eada9 100644
--- a/src/gpu/GrFixedClip.h
+++ b/src/gpu/GrFixedClip.h
@@ -39,6 +39,22 @@ public:
void getConservativeBounds(int width, int height, SkIRect* devResult,
bool* isIntersectionOfRects) const final;
+ bool isRRect(const SkRect& rtBounds, SkRRect* rr, bool* aa) const override {
+ if (fHasStencilClip) {
+ return false;
+ }
+ if (fScissorState.enabled()) {
+ SkRect rect = SkRect::Make(fScissorState.rect());
+ if (!rect.intersects(rtBounds)) {
+ return false;
+ }
+ rr->setRect(rect);
+ *aa = false;
+ return true;
+ }
+ return false;
+ };
+
private:
bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSettings,
GrAppliedClip* out) const final;