diff options
author | csmartdalton <csmartdalton@google.com> | 2016-08-31 11:55:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-31 11:55:52 -0700 |
commit | 29df76096fd30941086324902a82656df2d8becd (patch) | |
tree | 37740539e50fcdc09d694bc39e98e55aa26cf3f4 /src/gpu/GrFixedClip.cpp | |
parent | dc43898bbbd06202562514ae785116e0cc40f825 (diff) |
Define clear regions in terms of GrFixedClip
Updates clear APIs to take GrFixedClip instead of a rectangle. This
will allow us to use window rectangles with clears. Removes stencil
knobs from GrFixedClip.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262473003
Review-Url: https://codereview.chromium.org/2262473003
Diffstat (limited to 'src/gpu/GrFixedClip.cpp')
-rw-r--r-- | src/gpu/GrFixedClip.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gpu/GrFixedClip.cpp b/src/gpu/GrFixedClip.cpp index c42214b271..ebdd49bbf8 100644 --- a/src/gpu/GrFixedClip.cpp +++ b/src/gpu/GrFixedClip.cpp @@ -10,13 +10,6 @@ #include "GrAppliedClip.h" #include "GrDrawContext.h" -bool GrFixedClip::quickContains(const SkRect& rect) const { - if (fHasStencilClip) { - return false; - } - return !fScissorState.enabled() || GrClip::IsInsideClip(fScissorState.rect(), rect); -} - void GrFixedClip::getConservativeBounds(int width, int height, SkIRect* devResult, bool* isIntersectionOfRects) const { devResult->setXYWH(0, 0, width, height); @@ -46,9 +39,10 @@ bool GrFixedClip::apply(GrContext*, GrDrawContext* drawContext, bool isHWAntiAli } } - if (fHasStencilClip) { - out->addStencilClip(); - } - return true; } + +const GrFixedClip& GrFixedClip::Disabled() { + static const GrFixedClip disabled = GrFixedClip(); + return disabled; +} |