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

Unified Diff: tests/GrPorterDuffTest.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/effects/GrDashingEffect.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GrPorterDuffTest.cpp
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index d984f92142d3dddec9e1475e12b99e509e1ff9dd..0bafdeb9e893a886e809e6bc95d3782902925d9b 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -1100,26 +1100,27 @@ static void test_lcd_coverage_fallback_case(skiatest::Reporter* reporter, const
TestLCDCoverageBatch() : INHERITED(ClassID()) {}
private:
- void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
- out->setKnownFourComponents(GrColorPackRGBA(123, 45, 67, 221));
- }
-
- void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
- out->setUnknownFourComponents();
- out->setUsingLCDCoverage();
+ void computePipelineOptimizations(GrInitInvariantOutput* color,
+ GrInitInvariantOutput* coverage,
+ GrBatchToXPOverrides* overrides) const override {
+ color->setKnownFourComponents(GrColorPackRGBA(123, 45, 67, 221));
+ coverage->setUnknownFourComponents();
+ coverage->setUsingLCDCoverage();
+ overrides->fUsePLSDstRead = false;
}
const char* name() const override { return "Test LCD Text Batch"; }
- void initBatchTracker(const GrPipelineOptimizations&) override {}
+ void initBatchTracker(const GrXPOverridesForBatch&) override {}
bool onCombineIfPossible(GrBatch*, const GrCaps&) override { return false; }
void onPrepareDraws(Target*) override {};
typedef GrVertexBatch INHERITED;
} testLCDCoverageBatch;
- GrProcOptInfo colorPOI, covPOI;
- colorPOI.calcColorWithBatch(&testLCDCoverageBatch, nullptr, 0);
- covPOI.calcCoverageWithBatch(&testLCDCoverageBatch, nullptr, 0);
+ GrPipelineOptimizations opts;
+ testLCDCoverageBatch.getPipelineOptimizations(&opts);
+ GrProcOptInfo colorPOI = opts.fColorPOI;
+ GrProcOptInfo covPOI = opts.fCoveragePOI;
SkASSERT(kRGBA_GrColorComponentFlags == colorPOI.validFlags());
SkASSERT(covPOI.isFourChannelOutput());
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698