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

Unified Diff: src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp

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/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
diff --git a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
index 659f9d4adf62599cea8cd8c0cc3a901a7fa562d5..295bcb1f0ce9e6c7807b93df4f8afba623b5364e 100644
--- a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
@@ -135,29 +135,30 @@ public:
const char* name() const override { return "AAConvexBatch"; }
- void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
+ void computePipelineOptimizations(GrInitInvariantOutput* color,
+ GrInitInvariantOutput* coverage,
+ GrBatchToXPOverrides* overrides) const override {
// When this is called on a batch, there is only one geometry bundle
- out->setKnownFourComponents(fGeoData[0].fColor);
- }
- void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
- out->setUnknownSingleComponent();
+ color->setKnownFourComponents(fGeoData[0].fColor);
+ coverage->setUnknownSingleComponent();
+ overrides->fUsePLSDstRead = false;
}
private:
- void initBatchTracker(const GrPipelineOptimizations& opt) override {
+ void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
// Handle any color overrides
- if (!opt.readsColor()) {
+ if (!overrides.readsColor()) {
fGeoData[0].fColor = GrColor_ILLEGAL;
}
- opt.getOverrideColorIfSet(&fGeoData[0].fColor);
+ overrides.getOverrideColorIfSet(&fGeoData[0].fColor);
// setup batch properties
- fBatch.fColorIgnored = !opt.readsColor();
+ fBatch.fColorIgnored = !overrides.readsColor();
fBatch.fColor = fGeoData[0].fColor;
- fBatch.fUsesLocalCoords = opt.readsLocalCoords();
- fBatch.fCoverageIgnored = !opt.readsCoverage();
+ fBatch.fUsesLocalCoords = overrides.readsLocalCoords();
+ fBatch.fCoverageIgnored = !overrides.readsCoverage();
fBatch.fLinesOnly = SkPath::kLine_SegmentMask == fGeoData[0].fPath.getSegmentMasks();
- fBatch.fCanTweakAlphaForCoverage = opt.canTweakAlphaForCoverage();
+ fBatch.fCanTweakAlphaForCoverage = overrides.canTweakAlphaForCoverage();
}
void draw(GrVertexBatch::Target* target, const GrPipeline* pipeline, int vertexCount,
« no previous file with comments | « src/gpu/batches/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698