| Index: src/gpu/GrPipelineBuilder.h
|
| diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h
|
| index ad509e14f8a57cb1e3203661daeec2b80b5024c6..a8e43221da17b38d0377674483de98e76971713e 100644
|
| --- a/src/gpu/GrPipelineBuilder.h
|
| +++ b/src/gpu/GrPipelineBuilder.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "GrBatch.h"
|
| #include "GrBlend.h"
|
| +#include "GrClip.h"
|
| #include "GrDrawTargetCaps.h"
|
| #include "GrGpuResourceRef.h"
|
| #include "GrFragmentStage.h"
|
| @@ -44,7 +45,7 @@ public:
|
| * no GrPaint equivalents are set to default values with the exception of vertex attribute state
|
| * which is unmodified by this function and clipping which will be enabled.
|
| */
|
| - void setFromPaint(const GrPaint&, GrRenderTarget*);
|
| + void setFromPaint(const GrPaint&, GrRenderTarget*, const GrClip*);
|
|
|
| /// @}
|
|
|
| @@ -305,15 +306,10 @@ public:
|
| * the 3D API.
|
| */
|
| kHWAntialias_StateBit = 0x02,
|
| - /**
|
| - * Draws will respect the clip, otherwise the clip is ignored.
|
| - */
|
| - kClip_StateBit = 0x04,
|
|
|
| - kLast_StateBit = kClip_StateBit,
|
| + kLast_StateBit = kHWAntialias_StateBit,
|
| };
|
|
|
| - bool isClipState() const { return 0 != (fFlagBits & kClip_StateBit); }
|
| bool isDither() const { return 0 != (fFlagBits & kDither_StateBit); }
|
| bool isHWAntialias() const { return 0 != (fFlagBits & kHWAntialias_StateBit); }
|
|
|
| @@ -401,6 +397,10 @@ public:
|
| this->calcCoverageInvariantOutput(batch);
|
| return fCoverageProcInfo;
|
| }
|
| +
|
| + void setClip(const GrClip& clip) { fClip = clip; }
|
| + const GrClip& clip() const { return fClip; }
|
| +
|
| private:
|
| // Calculating invariant color / coverage information is expensive, so we partially cache the
|
| // results.
|
| @@ -448,6 +448,7 @@ private:
|
| mutable SkAutoTUnref<const GrXPFactory> fXPFactory;
|
| FragmentStageArray fColorStages;
|
| FragmentStageArray fCoverageStages;
|
| + GrClip fClip;
|
|
|
| mutable GrProcOptInfo fColorProcInfo;
|
| mutable GrProcOptInfo fCoverageProcInfo;
|
|
|