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

Unified Diff: src/gpu/batches/GrDrawPathBatch.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/GrDrawBatch.cpp ('k') | src/gpu/batches/GrDrawPathBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawPathBatch.h
diff --git a/src/gpu/batches/GrDrawPathBatch.h b/src/gpu/batches/GrDrawPathBatch.h
index 39c729fa28662b0047f390d1d89874d0bd2a9619..b5aa38a7dcddde6ed95c0716ef1e3152f24d7202 100644
--- a/src/gpu/batches/GrDrawPathBatch.h
+++ b/src/gpu/batches/GrDrawPathBatch.h
@@ -19,12 +19,12 @@
class GrDrawPathBatchBase : public GrDrawBatch {
public:
- void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
- out->setKnownFourComponents(fColor);
- }
-
- void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
- out->setKnownSingleComponent(0xff);
+ void computePipelineOptimizations(GrInitInvariantOutput* color,
+ GrInitInvariantOutput* coverage,
+ GrBatchToXPOverrides* overrides) const override {
+ color->setKnownFourComponents(fColor);
+ coverage->setKnownSingleComponent(0xff);
+ overrides->fUsePLSDstRead = false;
}
void setStencilSettings(const GrStencilSettings& stencil) { fStencilSettings = stencil; }
@@ -36,20 +36,20 @@ protected:
, fColor(initialColor) {}
const GrStencilSettings& stencilSettings() const { return fStencilSettings; }
- const GrPipelineOptimizations& opts() const { return fOpts; }
+ const GrXPOverridesForBatch& overrides() const { return fOverrides; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
GrColor color() const { return fColor; }
private:
- void initBatchTracker(const GrPipelineOptimizations& opts) override {
- opts.getOverrideColorIfSet(&fColor);
- fOpts = opts;
+ void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
+ overrides.getOverrideColorIfSet(&fColor);
+ fOverrides = overrides;
}
SkMatrix fViewMatrix;
GrColor fColor;
GrStencilSettings fStencilSettings;
- GrPipelineOptimizations fOpts;
+ GrXPOverridesForBatch fOverrides;
typedef GrDrawBatch INHERITED;
};
« no previous file with comments | « src/gpu/batches/GrDrawBatch.cpp ('k') | src/gpu/batches/GrDrawPathBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698