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

Unified Diff: src/gpu/GrTextStrike.h

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/GrFontScaler.cpp ('k') | src/gpu/GrTextStrike.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextStrike.h
diff --git a/src/gpu/GrTextStrike.h b/src/gpu/GrTextStrike.h
index 779d676e433f2a50e3185898396db9c221c05ee6..401bd7325909aa39be8a2e0ee655e1a08cf3f3e9 100644
--- a/src/gpu/GrTextStrike.h
+++ b/src/gpu/GrTextStrike.h
@@ -23,16 +23,18 @@
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 @@
GrTAllocPool<GrGlyph> fPool;
GrFontCache* fFontCache;
+ GrAtlas* fAtlas;
+ GrMaskFormat fMaskFormat;
bool fUseDistanceField;
GrAtlas::ClientPlotUsage fPlotUsage;
@@ -81,15 +85,10 @@
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(); }
« no previous file with comments | « src/gpu/GrFontScaler.cpp ('k') | src/gpu/GrTextStrike.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698