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

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
Index: src/gpu/batches/GrAtlasTextBatch.cpp
diff --git a/src/gpu/batches/GrAtlasTextBatch.cpp b/src/gpu/batches/GrAtlasTextBatch.cpp
index 91088c0c59068811a94fea0a48c9ba6dca51d39a..2db83416095f5f9f60a1ff81d0616fe7361e98f3 100644
--- a/src/gpu/batches/GrAtlasTextBatch.cpp
+++ b/src/gpu/batches/GrAtlasTextBatch.cpp
@@ -43,27 +43,26 @@ SkString GrAtlasTextBatch::dumpInfo() const {
return str;
}
-void GrAtlasTextBatch::getInvariantOutputColor(GrInitInvariantOutput* out) const {
+void GrAtlasTextBatch::computeBatchToXPOverrides(GrInitInvariantOutput* color,
+ GrInitInvariantOutput* coverage,
+ bool* usePLSDstRead) 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);
}
}

Powered by Google App Engine
This is Rietveld 408576698