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

Unified Diff: src/fonts/SkRandomScalerContext.cpp

Issue 1264843003: Revert of Add BW masks to random scaler context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 months 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 | « gm/textblobrandomfont.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fonts/SkRandomScalerContext.cpp
diff --git a/src/fonts/SkRandomScalerContext.cpp b/src/fonts/SkRandomScalerContext.cpp
index 799e51df820e5b9803e6a1aa55786420bd9c5caa..0693682faa707dcdcb9609d75a3b31bec79fd7bd 100644
--- a/src/fonts/SkRandomScalerContext.cpp
+++ b/src/fonts/SkRandomScalerContext.cpp
@@ -63,7 +63,7 @@
// Here we will change the mask format of the glyph
// NOTE this is being overridden by the base class
SkMask::Format format;
- switch (glyph->getGlyphID() % 4) {
+ switch (glyph->getGlyphID() % 3) {
case 0:
format = SkMask::kLCD16_Format;
break;
@@ -72,9 +72,6 @@
break;
case 2:
format = SkMask::kARGB32_Format;
- break;
- case 3:
- format = SkMask::kBW_Format;
break;
}
@@ -135,7 +132,7 @@
void SkRandomScalerContext::generateImage(const SkGlyph& glyph) {
SkMask::Format format = (SkMask::Format)glyph.fMaskFormat;
- switch (glyph.getGlyphID() % 4) {
+ switch (glyph.getGlyphID() % 3) {
case 0:
format = SkMask::kLCD16_Format;
break;
@@ -144,9 +141,6 @@
break;
case 2:
format = SkMask::kARGB32_Format;
- break;
- case 3:
- format = SkMask::kBW_Format;
break;
}
const_cast<SkGlyph&>(glyph).fMaskFormat = format;
« no previous file with comments | « gm/textblobrandomfont.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698