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

Unified Diff: src/gpu/batches/GrBatch.h

Issue 1282893002: Make initBatchTracker private, move towards pipeline on batch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/GrReorderCommandBuilder.cpp ('K') | « src/gpu/GrTargetCommands.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrBatch.h
diff --git a/src/gpu/batches/GrBatch.h b/src/gpu/batches/GrBatch.h
index 281a60e98ea9b396f7e13e8da41d20d73ea22423..7d91b1c1e18031bfa20091ea14c23dfb0da40f31 100644
--- a/src/gpu/batches/GrBatch.h
+++ b/src/gpu/batches/GrBatch.h
@@ -60,12 +60,6 @@ public:
virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0;
virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const = 0;
- /*
- * initBatchTracker is a hook for the some additional overrides / optimization possibilities
- * from the GrXferProcessor.
- */
- virtual void initBatchTracker(const GrPipelineOptimizations&) = 0;
-
bool combineIfPossible(GrBatch* that) {
if (this->classID() != that->classID()) {
return false;
@@ -108,7 +102,11 @@ public:
SkDEBUGCODE(bool isUsed() const { return fUsed; })
const GrPipeline* pipeline() const { return fPipeline; }
- void setPipeline(const GrPipeline* pipeline) { fPipeline.reset(SkRef(pipeline)); }
+
+ void setPipeline(const GrPipeline* pipeline, const GrPipelineOptimizations& optimizations) {
+ fPipeline.reset(SkRef(pipeline));
+ this->initBatchTracker(optimizations);
+ }
#if GR_BATCH_SPEW
uint32_t uniqueID() const { return fUniqueID; }
@@ -170,6 +168,13 @@ protected:
SkRect fBounds;
private:
+ /*
+ * initBatchTracker is a hook for the some additional overrides / optimization possibilities
+ * from the GrXferProcessor.
+ */
+ virtual void initBatchTracker(const GrPipelineOptimizations&) = 0;
+
+
static uint32_t GenID(int32_t* idCounter) {
// fCurrProcessorClassID has been initialized to kIllegalProcessorClassID. The
// atomic inc returns the old value not the incremented value. So we add
« src/gpu/GrReorderCommandBuilder.cpp ('K') | « src/gpu/GrTargetCommands.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698