Index: src/gpu/GrDrawTarget.h |
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h |
index 2da63d80ad4ec8b8bc9f3ad6cbace90b5f474f67..662b7e0590dd594d184dcd812b38fd325834df4c 100644 |
--- a/src/gpu/GrDrawTarget.h |
+++ b/src/gpu/GrDrawTarget.h |
@@ -8,7 +8,7 @@ |
#ifndef GrDrawTarget_DEFINED |
#define GrDrawTarget_DEFINED |
-#include "GrClipData.h" |
+#include "GrClip.h" |
#include "GrClipMaskManager.h" |
#include "GrContext.h" |
#include "GrPathProcessor.h" |
@@ -29,7 +29,7 @@ |
#include "SkXfermode.h" |
class GrBatch; |
-class GrClipData; |
+class GrClip; |
class GrDrawTargetCaps; |
class GrPath; |
class GrPathRange; |
@@ -55,23 +55,6 @@ public: |
const GrDrawTargetCaps* caps() const { return fCaps.get(); } |
/** |
- * Sets the current clip to the region specified by clip. All draws will be |
- * clipped against this clip if kClip_StateBit is enabled. |
- * |
- * Setting the clip may (or may not) zero out the client's stencil bits. |
- * |
- * @param description of the clipping region |
- */ |
- void setClip(const GrClipData* clip); |
- |
- /** |
- * Gets the current clip. |
- * |
- * @return the clip. |
- */ |
- const GrClipData* getClip() const; |
- |
- /** |
* There are two types of "sources" of geometry (vertices and indices) for |
* draw calls made on the target. When performing an indexed draw, the |
* indices and vertices can use different source types. Once a source is |
@@ -264,9 +247,7 @@ public: |
const SkRect* devBounds = NULL); |
// TODO devbounds should live on the batch |
- void drawBatch(GrPipelineBuilder*, |
- GrBatch*, |
- const SkRect* devBounds = NULL); |
+ void drawBatch(GrPipelineBuilder*, GrBatch*, const SkRect* devBounds = NULL); |
/** |
* Draws path into the stencil buffer. The fill must be either even/odd or |
@@ -475,27 +456,6 @@ public: |
//////////////////////////////////////////////////////////////////////////// |
- class AutoClipRestore : public ::SkNoncopyable { |
- public: |
- AutoClipRestore(GrDrawTarget* target) { |
- fTarget = target; |
- fClip = fTarget->getClip(); |
- } |
- |
- AutoClipRestore(GrDrawTarget* target, const SkIRect& newClip); |
- |
- ~AutoClipRestore() { |
- fTarget->setClip(fClip); |
- } |
- private: |
- GrDrawTarget* fTarget; |
- const GrClipData* fClip; |
- SkTLazy<SkClipStack> fStack; |
- GrClipData fReplacementClip; |
- }; |
- |
- //////////////////////////////////////////////////////////////////////////// |
- |
/** |
* Saves the geometry src state at construction and restores in the destructor. It also saves |
* and then restores the vertex attrib state. |
@@ -688,11 +648,12 @@ protected: |
struct PipelineInfo { |
PipelineInfo(GrPipelineBuilder* pipelineBuilder, GrScissorState* scissor, |
- const GrPrimitiveProcessor* primProc, const SkRect* devBounds, |
- GrDrawTarget* target); |
+ const GrPrimitiveProcessor* primProc, |
+ const SkRect* devBounds, GrDrawTarget* target); |
PipelineInfo(GrPipelineBuilder* pipelineBuilder, GrScissorState* scissor, |
- const GrBatch* batch, const SkRect* devBounds, GrDrawTarget* target); |
+ const GrBatch* batch, const SkRect* devBounds, |
+ GrDrawTarget* target); |
bool willBlendWithDst(const GrPrimitiveProcessor* primProc) const { |
return fPipelineBuilder->willBlendWithDst(primProc); |
@@ -838,7 +799,6 @@ private: |
kPreallocGeoSrcStateStackCnt = 4, |
}; |
SkSTArray<kPreallocGeoSrcStateStackCnt, GeometrySrcState, true> fGeoSrcStateStack; |
- const GrClipData* fClip; |
// The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTarget. |
GrContext* fContext; |
// To keep track that we always have at least as many debug marker adds as removes |