diff options
author | jvanverth <jvanverth@google.com> | 2014-10-10 11:36:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-10 11:36:12 -0700 |
commit | 294c32612d712eb56361ac5439271a91ae96862e (patch) | |
tree | 296fe453480d2c47365ff64a05d6e79aa04c657e /include | |
parent | 71856d520461ae025a0332aa0ce9735a096d9baf (diff) |
Fix color emoji.
Removes the GrMaskFormat and single atlas in GrTextStrike.
Replaces it by storing the GrMaskFormat in each GrGlyph, and
doing a lookup for the correct atlas based on that.
Disables color glyph rendering in GrDistanceFieldTextContext
for now.
BUG=skia:2887
Committed: https://skia.googlesource.com/skia/+/bc92163ddfe957ad6ffbb02ac40e0ba75ff82216
Review URL: https://codereview.chromium.org/636183005
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrFontScaler.h | 3 | ||||
-rw-r--r-- | include/gpu/GrGlyph.h | 18 |
2 files changed, 13 insertions, 8 deletions
diff --git a/include/gpu/GrFontScaler.h b/include/gpu/GrFontScaler.h index 0376038135..54d1e3f9cc 100644 --- a/include/gpu/GrFontScaler.h +++ b/include/gpu/GrFontScaler.h @@ -66,7 +66,8 @@ public: virtual ~GrFontScaler(); const GrFontDescKey* getKey(); - GrMaskFormat getMaskFormat(); + GrMaskFormat getMaskFormat() const; + GrMaskFormat getPackedGlyphMaskFormat(GrGlyph::PackedID) const; bool getPackedGlyphBounds(GrGlyph::PackedID, SkIRect* bounds); bool getPackedGlyphImage(GrGlyph::PackedID, int width, int height, int rowBytes, void* image); diff --git a/include/gpu/GrGlyph.h b/include/gpu/GrGlyph.h index a379144a42..0e534d694a 100644 --- a/include/gpu/GrGlyph.h +++ b/include/gpu/GrGlyph.h @@ -9,8 +9,10 @@ #define GrGlyph_DEFINED #include "GrRect.h" -#include "SkPath.h" +#include "GrTypes.h" + #include "SkChecksum.h" +#include "SkPath.h" class GrPlot; @@ -23,17 +25,19 @@ class GrPlot; struct GrGlyph { typedef uint32_t PackedID; - GrPlot* fPlot; - SkPath* fPath; - PackedID fPackedID; - GrIRect16 fBounds; - SkIPoint16 fAtlasLocation; + GrPlot* fPlot; + SkPath* fPath; + PackedID fPackedID; + GrMaskFormat fMaskFormat; + GrIRect16 fBounds; + SkIPoint16 fAtlasLocation; - void init(GrGlyph::PackedID packed, const SkIRect& bounds) { + void init(GrGlyph::PackedID packed, const SkIRect& bounds, GrMaskFormat format) { fPlot = NULL; fPath = NULL; fPackedID = packed; fBounds.set(bounds); + fMaskFormat = format; fAtlasLocation.set(0, 0); } |