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

Unified Diff: src/gpu/batches/GrAtlasTextBatch.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/GrAtlasTextBatch.h ('k') | src/gpu/batches/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAtlasTextBatch.cpp
diff --git a/src/gpu/batches/GrAtlasTextBatch.cpp b/src/gpu/batches/GrAtlasTextBatch.cpp
index 9d408f997ab7e24c749d1406a09e196d1640065d..74f253bc425442e015cdfbbf52cb1ef2616d0533 100644
--- a/src/gpu/batches/GrAtlasTextBatch.cpp
+++ b/src/gpu/batches/GrAtlasTextBatch.cpp
@@ -247,42 +247,41 @@ SkString GrAtlasTextBatch::dumpInfo() const {
return str;
}
-void GrAtlasTextBatch::getInvariantOutputColor(GrInitInvariantOutput* out) const {
+void GrAtlasTextBatch::computePipelineOptimizations(GrInitInvariantOutput* color,
+ GrInitInvariantOutput* coverage,
+ GrBatchToXPOverrides* overrides) const {
if (kColorBitmapMask_MaskType == fMaskType) {
- out->setUnknownFourComponents();
+ color->setUnknownFourComponents();
} else {
- out->setKnownFourComponents(fBatch.fColor);
+ color->setKnownFourComponents(fBatch.fColor);
}
-}
-
-void GrAtlasTextBatch::getInvariantOutputCoverage(GrInitInvariantOutput* out) const {
switch (fMaskType) {
case kGrayscaleDistanceField_MaskType:
case kGrayscaleCoverageMask_MaskType:
- out->setUnknownSingleComponent();
+ coverage->setUnknownSingleComponent();
break;
case kLCDCoverageMask_MaskType:
case kLCDDistanceField_MaskType:
- out->setUnknownOpaqueFourComponents();
- out->setUsingLCDCoverage();
+ coverage->setUnknownOpaqueFourComponents();
+ coverage->setUsingLCDCoverage();
break;
case kColorBitmapMask_MaskType:
- out->setKnownSingleComponent(0xff);
+ coverage->setKnownSingleComponent(0xff);
}
}
-void GrAtlasTextBatch::initBatchTracker(const GrPipelineOptimizations& opt) {
+void GrAtlasTextBatch::initBatchTracker(const GrXPOverridesForBatch& overrides) {
// 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();
}
enum RegenMask {
« no previous file with comments | « src/gpu/batches/GrAtlasTextBatch.h ('k') | src/gpu/batches/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698