Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: src/gpu/GrRODrawState.h

Issue 508663002: Create an optimized draw state but not hooked in yet to gpu pipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@drawBase
Patch Set: Remove unused function Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/gpu/GrOptDrawState.cpp ('K') | « src/gpu/GrOptDrawState.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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==
« src/gpu/GrOptDrawState.cpp ('K') | « src/gpu/GrOptDrawState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698