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

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

Issue 1467553002: New API for computing optimization invariants. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « src/gpu/batches/GrDrawAtlasBatch.cpp ('k') | src/gpu/batches/GrDrawBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawBatch.h
diff --git a/src/gpu/batches/GrDrawBatch.h b/src/gpu/batches/GrDrawBatch.h
index b5def697c791ea7cb2aaaea0d0a24a77789be19a..8e738789812ce6dd54e3a357d0e3c52de8e0c39a 100644
--- a/src/gpu/batches/GrDrawBatch.h
+++ b/src/gpu/batches/GrDrawBatch.h
@@ -43,8 +43,10 @@ public:
GrDrawBatch(uint32_t classID);
~GrDrawBatch() override;
- virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0;
- virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const = 0;
+ /**
+ * Fills in a structure informing the XP of overrides to its normal behavior.
+ */
+ void getPipelineOptimizations(GrPipelineOptimizations* override) const;
const GrPipeline* pipeline() const {
SkASSERT(fPipelineInstalled);
@@ -80,12 +82,17 @@ public:
return string;
}
+protected:
+ virtual void computePipelineOptimizations(GrInitInvariantOutput* color,
+ GrInitInvariantOutput* coverage,
+ GrBatchToXPOverrides* overrides) const = 0;
+
private:
/**
* initBatchTracker is a hook for the some additional overrides / optimization possibilities
* from the GrXferProcessor.
*/
- virtual void initBatchTracker(const GrPipelineOptimizations&) = 0;
+ virtual void initBatchTracker(const GrXPOverridesForBatch&) = 0;
protected:
SkTArray<SkAutoTUnref<GrBatchUploader>, true> fInlineUploads;
« no previous file with comments | « src/gpu/batches/GrDrawAtlasBatch.cpp ('k') | src/gpu/batches/GrDrawBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698