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/GrAALinearizingConvexPathRenderer.cpp | |
parent | 6868c3fccf65d297a64919a7cb74f09780c845c3 (diff) |
New API for computing optimization invariants.
Review URL: https://codereview.chromium.org/1467553002
Diffstat (limited to 'src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp')
-rw-r--r-- | src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp index 659f9d4adf..295bcb1f0c 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, |