diff options
author | 2015-11-24 12:10:10 -0800 | |
---|---|---|
committer | 2015-11-24 12:10:10 -0800 | |
commit | ff2103200bad7abcf8929ae22ac78a9f4f725142 (patch) | |
tree | b6fef9998bf11fdfbb9855414e8980cf47a2a4e9 /src/gpu/batches/GrDrawBatch.h | |
parent | 6868c3fccf65d297a64919a7cb74f09780c845c3 (diff) |
New API for computing optimization invariants.
Review URL: https://codereview.chromium.org/1467553002
Diffstat (limited to 'src/gpu/batches/GrDrawBatch.h')
-rw-r--r-- | src/gpu/batches/GrDrawBatch.h | 13 |
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; |