aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrDrawBatch.h
diff options
context:
space:
mode:
authorGravatar ethannicholas <ethannicholas@google.com>2015-11-24 12:10:10 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-24 12:10:10 -0800
commitff2103200bad7abcf8929ae22ac78a9f4f725142 (patch)
treeb6fef9998bf11fdfbb9855414e8980cf47a2a4e9 /src/gpu/batches/GrDrawBatch.h
parent6868c3fccf65d297a64919a7cb74f09780c845c3 (diff)
New API for computing optimization invariants.
Diffstat (limited to 'src/gpu/batches/GrDrawBatch.h')
-rw-r--r--src/gpu/batches/GrDrawBatch.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gpu/batches/GrDrawBatch.h b/src/gpu/batches/GrDrawBatch.h
index b5def697c7..8e73878981 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;