Chromium Code Reviews| Index: src/gpu/GrFixedClip.h |
| diff --git a/src/gpu/GrFixedClip.h b/src/gpu/GrFixedClip.h |
| index 8b3a9c1c9e9d7827f687a22be23b9f010502b0e8..942ae1a08107037e83e1025b259c62fd22d76a31 100644 |
| --- a/src/gpu/GrFixedClip.h |
| +++ b/src/gpu/GrFixedClip.h |
| @@ -9,7 +9,8 @@ |
| #define GrFixedClip_DEFINED |
| #include "GrClip.h" |
| -#include "GrTypesPriv.h" |
| +#include "GrScissorState.h" |
| +#include "GrWindowRectsState.h" |
| /** |
| * GrFixedClip is a clip that gets implemented by fixed-function hardware. |
| @@ -29,32 +30,19 @@ public: |
| return fScissorState.intersect(irect); |
| } |
| - bool quickContains(const SkRect& rect) const final { |
| - return !fScissorState.enabled() || GrClip::IsInsideClip(fScissorState.rect(), rect); |
| - } |
| - void getConservativeBounds(int width, int height, SkIRect* devResult, |
| - bool* isIntersectionOfRects) const final; |
| - |
| - bool isRRect(const SkRect& rtBounds, SkRRect* rr, bool* aa) const override { |
| - if (fScissorState.enabled()) { |
| - SkRect rect = SkRect::Make(fScissorState.rect()); |
| - if (!rect.intersects(rtBounds)) { |
| - return false; |
| - } |
| - rr->setRect(rect); |
| - *aa = false; |
| - return true; |
| - } |
| - return false; |
| - }; |
| - |
| - bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSettings, |
| - GrAppliedClip* out) const final; |
| + const GrWindowRectsState& windowRectsState() const { return fWindowRectsState; } |
| + GrWindowRectsState& windowRectsState() { return fWindowRectsState; } |
| + |
| + bool quickContains(const SkRect&) const final; |
| + void getConservativeBounds(int width, int height, SkIRect* devResult, bool* iior) const final; |
| + bool isRRect(const SkRect& rtBounds, SkRRect* rr, bool* aa) const final; |
|
bsalomon
2016/08/31 14:00:52
I think I prefer "override" to "final" on these me
csmartdalton
2016/08/31 15:04:34
Done.
|
| + bool apply(GrContext*, GrDrawContext*, bool, bool, GrAppliedClip* out) const final; |
| static const GrFixedClip& Disabled(); |
| private: |
| - GrScissorState fScissorState; |
| + GrScissorState fScissorState; |
| + GrWindowRectsState fWindowRectsState; |
| }; |
| #endif |