Chromium Code Reviews| Index: src/gpu/GrAppliedClip.h |
| diff --git a/src/gpu/GrAppliedClip.h b/src/gpu/GrAppliedClip.h |
| index c02e9d01c268ea7b162c66cc30b47f88ad59fac3..3c788100d31a14231ee62c872c7f455e4e2516e9 100644 |
| --- a/src/gpu/GrAppliedClip.h |
| +++ b/src/gpu/GrAppliedClip.h |
| @@ -8,8 +8,8 @@ |
| #ifndef GrAppliedClip_DEFINED |
| #define GrAppliedClip_DEFINED |
| -#include "GrTypesPriv.h" |
| -#include "GrWindowRectangles.h" |
| +#include "GrScissorState.h" |
| +#include "GrWindowRectsState.h" |
| class GrFragmentProcessor; |
| @@ -25,7 +25,7 @@ public: |
| } |
| const GrScissorState& scissorState() const { return fScissorState; } |
| - const GrWindowRectangles& windowRects() const { return fWindowRects; } |
| + const GrWindowRectsState& windowRectsState() const { return fWindowRectsState; } |
| GrFragmentProcessor* clipCoverageFragmentProcessor() const { return fClipCoverageFP.get(); } |
| bool hasStencilClip() const { return fHasStencilClip; } |
| @@ -36,12 +36,9 @@ public: |
| return fScissorState.intersect(irect) && fClippedDrawBounds.intersect(SkRect::Make(irect)); |
| } |
| - /** |
| - * Adds an exclusive window rectangle to the clip. It is not currently supported to switch the |
| - * windows to inclusive mode. |
| - */ |
| - void addWindowRectangle(const SkIRect& window) { |
| - fWindowRects.addWindow(window); |
| + GrWindowRectsState& SK_WARN_UNUSED_RESULT addWindowRectangles() { |
|
bsalomon
2016/08/31 14:40:39
Can this be a setter (or pair of setters) rather t
csmartdalton
2016/08/31 15:04:34
Done.
|
| + SkASSERT(fWindowRectsState.disabled()); |
| + return fWindowRectsState; |
| } |
| void addCoverageFP(sk_sp<GrFragmentProcessor> fp) { |
| @@ -62,7 +59,7 @@ public: |
| private: |
| GrScissorState fScissorState; |
| - GrWindowRectangles fWindowRects; |
| + GrWindowRectsState fWindowRectsState; |
| sk_sp<GrFragmentProcessor> fClipCoverageFP; |
| bool fHasStencilClip; |
| SkRect fClippedDrawBounds; |