Index: src/gpu/GrRODrawState.h |
diff --git a/src/gpu/GrRODrawState.h b/src/gpu/GrRODrawState.h |
index f4821fc80cd2c3891ddcc906e6143bf7297b1880..a10931efc9b407561edd867dea86c3a066279e33 100644 |
--- a/src/gpu/GrRODrawState.h |
+++ b/src/gpu/GrRODrawState.h |
@@ -12,6 +12,7 @@ |
#include "GrEffectStage.h" |
#include "SkMatrix.h" |
+class GrDrawState; |
class GrDrawTargetCaps; |
class GrPaint; |
class GrRenderTarget; |
@@ -26,6 +27,10 @@ class GrRODrawState : public SkRefCnt { |
public: |
SK_DECLARE_INST_COUNT(GrRODrawState) |
+ GrRODrawState() {} |
+ |
+ GrRODrawState& operator= (const GrRODrawState& that); |
+ |
/////////////////////////////////////////////////////////////////////////// |
/// @name Vertex Attributes |
//// |
@@ -68,6 +73,10 @@ public: |
return -1 != fFixedFunctionVertexAttribIndices[kCoverage_GrVertexAttribBinding]; |
} |
+ const int* getFixedFunctionVertexAttribIndices() const { |
+ return fFixedFunctionVertexAttribIndices; |
+ } |
+ |
bool validateVertexAttribs() const; |
/// @} |
@@ -295,6 +304,8 @@ public: |
kLastPublicStateBit = kDummyStateBit-1, |
}; |
+ uint32_t getFlagBits() const { return fFlagBits; } |
+ |
bool isStateFlagEnabled(uint32_t stateBit) const { return 0 != (stateBit & fFlagBits); } |
bool isDitherState() const { return 0 != (fFlagBits & kDither_StateBit); } |
@@ -340,9 +351,11 @@ public: |
kB_CombinedState, |
}; |
- GrRODrawState& operator= (const GrRODrawState& that); |
- |
protected: |
+ explicit GrRODrawState(const GrRODrawState& drawState) : INHERITED() { |
+ fRenderTarget.reset(SkSafeRef(drawState.fRenderTarget.get())); |
+ } |
+ |
bool isEqual(const GrRODrawState& that) const; |
// These fields are roughly sorted by decreasing likelihood of being different in op== |