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

Unified Diff: src/gpu/GrFontScaler.cpp

Issue 640413004: Revert of Fix color emoji. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrTextStrike.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrFontScaler.cpp
diff --git a/src/gpu/GrFontScaler.cpp b/src/gpu/GrFontScaler.cpp
index b16b498ac1d31bce909c2d218c2d7f91141913c5..164768f3b08bbfe29f67f226486bca99e1173e8e 100644
--- a/src/gpu/GrFontScaler.cpp
+++ b/src/gpu/GrFontScaler.cpp
@@ -59,7 +59,7 @@
SkSafeUnref(fKey);
}
-GrMaskFormat GrFontScaler::getMaskFormat() const {
+GrMaskFormat GrFontScaler::getMaskFormat() {
SkMask::Format format = fStrike->getMaskFormat();
switch (format) {
case SkMask::kBW_Format:
@@ -83,28 +83,6 @@
fKey = SkNEW_ARGS(GrFontDescKey, (fStrike->getDescriptor()));
}
return fKey;
-}
-
-GrMaskFormat GrFontScaler::getPackedGlyphMaskFormat(GrGlyph::PackedID packed) const {
- const SkGlyph& glyph = fStrike->getGlyphIDMetrics(GrGlyph::UnpackID(packed),
- GrGlyph::UnpackFixedX(packed),
- GrGlyph::UnpackFixedY(packed));
- SkMask::Format format = static_cast<SkMask::Format>(glyph.fMaskFormat);
- switch (format) {
- case SkMask::kBW_Format:
- // fall through to kA8 -- we store BW glyphs in our 8-bit cache
- case SkMask::kA8_Format:
- return kA8_GrMaskFormat;
- case SkMask::kLCD16_Format:
- return kA565_GrMaskFormat;
- case SkMask::kLCD32_Format:
- return kA888_GrMaskFormat;
- case SkMask::kARGB32_Format:
- return kARGB_GrMaskFormat;
- default:
- SkDEBUGFAIL("unsupported SkMask::Format");
- return kA8_GrMaskFormat;
- }
}
bool GrFontScaler::getPackedGlyphBounds(GrGlyph::PackedID packed, SkIRect* bounds) {
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrTextStrike.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698