aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGlyph.h
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2015-03-18 15:14:05 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-18 15:14:05 -0700
commit1a5041e446bda33e7f5e18f0df8d0be77c0a2349 (patch)
tree3e7f1d9118570e5d5b80632e7b121b59f3c5b2de /src/gpu/GrGlyph.h
parent8dc58edd71c11f232860724dfa3b566895478034 (diff)
Revert of Ensure that we use different glyph entries for regular and df text. (patchset #2 id:20001 of https://codereview.chromium.org/1020593003/)
Reason for revert: Bad glyphs in dftext GM. Original issue's description: > Ensure that we use different glyph entries for regular and df text. > > Currently if we switch between regular text and df text while using > the same GrContext, they may use the same entry in the Ganesh font cache, > which is incorrect. This change ensures that they will have different entries. > > Committed: https://skia.googlesource.com/skia/+/8dc58edd71c11f232860724dfa3b566895478034 TBR=joshualitt@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1011403005
Diffstat (limited to 'src/gpu/GrGlyph.h')
-rw-r--r--src/gpu/GrGlyph.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gpu/GrGlyph.h b/src/gpu/GrGlyph.h
index 108f2f0fe7..0e534d694a 100644
--- a/src/gpu/GrGlyph.h
+++ b/src/gpu/GrGlyph.h
@@ -23,11 +23,6 @@ class GrPlot;
- failed to get metrics
*/
struct GrGlyph {
- enum MaskStyle {
- kCoverage_MaskStyle,
- kDistance_MaskStyle
- };
-
typedef uint32_t PackedID;
GrPlot* fPlot;
@@ -65,11 +60,10 @@ struct GrGlyph {
return (pos >> 14) & 3;
}
- static inline PackedID Pack(uint16_t glyphID, SkFixed x, SkFixed y, MaskStyle ms) {
+ static inline PackedID Pack(uint16_t glyphID, SkFixed x, SkFixed y) {
x = ExtractSubPixelBitsFromFixed(x);
y = ExtractSubPixelBitsFromFixed(y);
- int dfFlag = (ms == kDistance_MaskStyle) ? 0x1 : 0x0;
- return (dfFlag << 20) | (x << 18) | (y << 16) | glyphID;
+ return (x << 18) | (y << 16) | glyphID;
}
static inline SkFixed UnpackFixedX(PackedID packed) {
@@ -80,10 +74,6 @@ struct GrGlyph {
return ((packed >> 16) & 3) << 14;
}
- static inline MaskStyle UnpackMaskStyle(PackedID packed) {
- return ((packed >> 20) & 1) ? kDistance_MaskStyle : kCoverage_MaskStyle;
- }
-
static inline uint16_t UnpackID(PackedID packed) {
return (uint16_t)packed;
}