| Index: src/gpu/batches/GrDrawBatch.h
|
| diff --git a/src/gpu/batches/GrDrawBatch.h b/src/gpu/batches/GrDrawBatch.h
|
| index b5def697c791ea7cb2aaaea0d0a24a77789be19a..a11240a2c6c5f494649ea03ebf0279731d421343 100644
|
| --- a/src/gpu/batches/GrDrawBatch.h
|
| +++ b/src/gpu/batches/GrDrawBatch.h
|
| @@ -33,6 +33,16 @@ private:
|
| GrBatchToken fLastUploadToken;
|
| };
|
|
|
| +struct GrBatchToXPOverrides {
|
| + bool fUsePLSDstRead;
|
| +};
|
| +
|
| +struct GrPipelineOptimizations {
|
| + GrProcOptInfo fColorPOI;
|
| + GrProcOptInfo fCoveragePOI;
|
| + GrBatchToXPOverrides fOverrides;
|
| +};
|
| +
|
| /**
|
| * Base class for GrBatches that draw. These batches have a GrPipeline installed by GrDrawTarget.
|
| */
|
| @@ -43,8 +53,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 +92,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;
|
|
|