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

Unified Diff: src/gpu/GrOptDrawState.h

Issue 845103005: GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: a bit more tweaking Created 5 years, 11 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
Index: src/gpu/GrOptDrawState.h
diff --git a/src/gpu/GrOptDrawState.h b/src/gpu/GrOptDrawState.h
index 626e6d7c6160086189e473135952a9963fbfb25e..989fa9a7d24eb42e7afd7f9d5874613ba65b36ef 100644
--- a/src/gpu/GrOptDrawState.h
+++ b/src/gpu/GrOptDrawState.h
@@ -17,9 +17,9 @@
#include "SkMatrix.h"
#include "SkRefCnt.h"
+class GrBatch;
class GrDeviceCoordTexture;
class GrDrawState;
-class GrPathProcessor;
/**
* Class that holds an optimized version of a GrDrawState. It is meant to be an immutable class,
@@ -29,10 +29,17 @@ class GrOptDrawState {
public:
SK_DECLARE_INST_COUNT(GrOptDrawState)
+ // TODO get rid of this version of the constructor when we use batch everywhere
GrOptDrawState(const GrDrawState& drawState, const GrPrimitiveProcessor*,
const GrDrawTargetCaps&, const GrScissorState&,
const GrDeviceCoordTexture* dstCopy);
+ GrOptDrawState(GrBatch*,
+ const GrDrawState& drawState,
+ const GrDrawTargetCaps&, const GrScissorState&,
+ const GrDeviceCoordTexture* dstCopy);
+
+
/*
* Returns true if it is possible to combine the two GrOptDrawStates and it will update 'this'
* to subsume 'that''s draw.
@@ -135,6 +142,14 @@ public:
const GrGeometryProcessor::InitBT& getInitBatchTracker() const { return fInitBT; }
private:
+ // TODO we can have one constructor once GrBatch is complete
+ void internalConstructor(const GrDrawState&,
+ const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI,
+ const GrDrawTargetCaps&,
+ const GrScissorState&,
+ const GrDeviceCoordTexture* dstCopy);
+
/**
* Alter the program desc and inputs (attribs and processors) based on the blend optimization.
*/

Powered by Google App Engine
This is Rietveld 408576698