| Index: include/gpu/GrClip.h
|
| diff --git a/include/gpu/GrClip.h b/include/gpu/GrClip.h
|
| index a6a0a665bdca0174f5937bca753eb662a9a7ee34..6457d03051e8fc22de32cc8d6a9fa7abbe7ab42f 100644
|
| --- a/include/gpu/GrClip.h
|
| +++ b/include/gpu/GrClip.h
|
| @@ -11,55 +11,10 @@
|
| #include "GrFragmentProcessor.h"
|
| #include "GrTypesPriv.h"
|
|
|
| +class GrAppliedClip;
|
| class GrDrawContext;
|
|
|
| /**
|
| - * Produced by GrClip. It provides a set of modifications to the drawing state that are used to
|
| - * create the final GrPipeline for a GrBatch.
|
| - */
|
| -class GrAppliedClip : public SkNoncopyable {
|
| -public:
|
| - GrAppliedClip(const SkRect& drawBounds)
|
| - : fHasStencilClip(false)
|
| - , fClippedDrawBounds(drawBounds) {
|
| - }
|
| -
|
| - const GrScissorState& scissorState() const { return fScissorState; }
|
| - GrFragmentProcessor* clipCoverageFragmentProcessor() const { return fClipCoverageFP.get(); }
|
| - bool hasStencilClip() const { return fHasStencilClip; }
|
| -
|
| - /**
|
| - * Intersects the applied clip with the provided rect. Returns false if the draw became empty.
|
| - */
|
| - bool addScissor(const SkIRect& irect) {
|
| - return fScissorState.intersect(irect) && fClippedDrawBounds.intersect(SkRect::Make(irect));
|
| - }
|
| -
|
| - void addCoverageFP(sk_sp<GrFragmentProcessor> fp) {
|
| - SkASSERT(!fClipCoverageFP);
|
| - fClipCoverageFP = fp;
|
| - }
|
| -
|
| - void addStencilClip() {
|
| - SkASSERT(!fHasStencilClip);
|
| - fHasStencilClip = true;
|
| - }
|
| -
|
| - /**
|
| - * Returns the device bounds of the draw after clip has been applied. TODO: Ideally this would
|
| - * consider the combined effect of all clipping techniques in play (scissor, stencil, fp, etc.).
|
| - */
|
| - const SkRect& clippedDrawBounds() const { return fClippedDrawBounds; }
|
| -
|
| -private:
|
| - GrScissorState fScissorState;
|
| - sk_sp<GrFragmentProcessor> fClipCoverageFP;
|
| - bool fHasStencilClip;
|
| - SkRect fClippedDrawBounds;
|
| - typedef SkNoncopyable INHERITED;
|
| -};
|
| -
|
| -/**
|
| * GrClip is an abstract base class for applying a clip. It constructs a clip mask if necessary, and
|
| * fills out a GrAppliedClip instructing the caller on how to set up the draw state.
|
| */
|
|
|