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

Unified Diff: src/gpu/GrDrawState.h

Issue 845103005: GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: cleanup 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/GrDrawState.h
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index ce29e6ca6894a2fd57ee77c7e39ea5df29699693..7397abfac4e5ff220145b65f2d1c74368a654039 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -8,7 +8,7 @@
#ifndef GrDrawState_DEFINED
#define GrDrawState_DEFINED
-
+#include "GrBatch.h"
#include "GrBlend.h"
#include "GrDrawTargetCaps.h"
#include "GrGeometryProcessor.h"
@@ -112,6 +112,7 @@ public:
* TODO remove when we have an XP
*/
bool willEffectReadDstColor(const GrPrimitiveProcessor*) const;
+ bool willEffectReadDstColor(const GrBatch*) const;
/**
* The xfer processor factory.
@@ -406,6 +407,7 @@ public:
private:
bool isEqual(const GrDrawState& that, bool explicitLocalCoords) const;
+ // TODO delete when we have Batch
const GrProcOptInfo& colorProcInfo(const GrPrimitiveProcessor* pp) const {
this->calcColorInvariantOutput(pp);
return fColorProcInfo;
@@ -416,17 +418,28 @@ private:
return fCoverageProcInfo;
}
+ const GrProcOptInfo& colorProcInfo(const GrBatch* batch) const {
+ this->calcColorInvariantOutput(batch);
+ return fColorProcInfo;
+ }
+
+ const GrProcOptInfo& coverageProcInfo(const GrBatch* batch) const {
+ this->calcCoverageInvariantOutput(batch);
+ return fCoverageProcInfo;
+ }
+
/**
- * If fColorProcInfoValid is false, function calculates the invariant output for the color
- * stages and results are stored in fColorProcInfo.
+ * Primproc variants of the calc functions
+ * TODO remove these when batch is everywhere
*/
void calcColorInvariantOutput(const GrPrimitiveProcessor*) const;
+ void calcCoverageInvariantOutput(const GrPrimitiveProcessor*) const;
/**
- * If fCoverageProcInfoValid is false, function calculates the invariant output for the coverage
- * stages and results are stored in fCoverageProcInfo.
+ * GrBatch provides the initial seed for these loops based off of the batch it starts with
bsalomon 2015/01/20 16:14:02 based off of the ... it starts with. data? primit
*/
- void calcCoverageInvariantOutput(const GrPrimitiveProcessor*) const;
+ void calcColorInvariantOutput(const GrBatch*) const;
+ void calcCoverageInvariantOutput(const GrBatch*) const;
/**
* If fColorProcInfoValid is false, function calculates the invariant output for the color
@@ -462,8 +475,11 @@ private:
mutable bool fCoverageProcInfoValid;
mutable GrColor fColorCache;
mutable GrColor fCoverageCache;
+ // TODO delete when batch is everywhere
mutable const GrPrimitiveProcessor* fColorPrimProc;
mutable const GrPrimitiveProcessor* fCoveragePrimProc;
+ mutable const GrBatch* fColorBatch;
bsalomon 2015/01/20 16:14:02 color and coverage batches?
+ mutable const GrBatch* fCoverageBatch;
friend class GrOptDrawState;
};

Powered by Google App Engine
This is Rietveld 408576698