aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextStrike.h
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2014-10-10 08:52:03 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-10 08:52:03 -0700
commite817dbb889b6ef1a811c2c3e6b405ad5c11d6758 (patch)
tree443a1c6aa07e630f2700fced76687efbfd85effb /src/gpu/GrTextStrike.h
parentbc92163ddfe957ad6ffbb02ac40e0ba75ff82216 (diff)
Revert of Fix color emoji. (patchset #11 id:320001 of https://codereview.chromium.org/636183005/)
Reason for revert: Crashing the Windows bots. Original issue's description: > 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 TBR=robertphillips@google.com,bungeman@google.com,reed@google.com,bsalomon@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2887 Review URL: https://codereview.chromium.org/640413004
Diffstat (limited to 'src/gpu/GrTextStrike.h')
-rw-r--r--src/gpu/GrTextStrike.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gpu/GrTextStrike.h b/src/gpu/GrTextStrike.h
index 779d676e43..401bd73259 100644
--- a/src/gpu/GrTextStrike.h
+++ b/src/gpu/GrTextStrike.h
@@ -23,16 +23,18 @@ class GrGpu;
class GrFontPurgeListener;
/**
- * The textstrike maps a hostfontscaler instance to a dictionary of
+ * The textcache maps a hostfontscaler instance to a dictionary of
* glyphid->strike
*/
class GrTextStrike {
public:
- GrTextStrike(GrFontCache*, const GrFontDescKey* fontScalerKey);
+ GrTextStrike(GrFontCache*, const GrFontDescKey* fontScalerKey, GrMaskFormat, GrAtlas*);
~GrTextStrike();
const GrFontDescKey* getFontScalerKey() const { return fFontScalerKey; }
GrFontCache* getFontCache() const { return fFontCache; }
+ GrMaskFormat getMaskFormat() const { return fMaskFormat; }
+ GrTexture* getTexture() const { return fAtlas->getTexture(); }
inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*);
// returns true if glyph (or glyph+padding for distance field)
@@ -65,6 +67,8 @@ private:
GrTAllocPool<GrGlyph> fPool;
GrFontCache* fFontCache;
+ GrAtlas* fAtlas;
+ GrMaskFormat fMaskFormat;
bool fUseDistanceField;
GrAtlas::ClientPlotUsage fPlotUsage;
@@ -81,15 +85,10 @@ public:
inline GrTextStrike* getStrike(GrFontScaler*, bool useDistanceField);
- // add to texture atlas that matches this format
- GrPlot* addToAtlas(GrMaskFormat format, GrAtlas::ClientPlotUsage* usage,
- int width, int height, const void* image,
- SkIPoint16* loc);
-
void freeAll();
- // make an unused plot available for this glyph
- bool freeUnusedPlot(GrTextStrike* preserveStrike, const GrGlyph* glyph);
+ // make an unused plot available
+ bool freeUnusedPlot(GrTextStrike* preserveStrike);
// testing
int countStrikes() const { return fCache.count(); }