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

Unified Diff: src/core/SkGlyphCache.h

Issue 1383403003: Revert of Stop using SkScalerContext::getAdvance() in SkGlyphCache. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « no previous file | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkGlyphCache.h
diff --git a/src/core/SkGlyphCache.h b/src/core/SkGlyphCache.h
index 4eb6b5bc60a82ad8b2b2fce8ccdd50fcb5043a02..2f1f417250eda9aae45b62e614eb158afdb37048 100644
--- a/src/core/SkGlyphCache.h
+++ b/src/core/SkGlyphCache.h
@@ -181,6 +181,11 @@
private:
friend class SkGlyphCache_Globals;
+ enum MetricsType {
+ kJustAdvance_MetricsType,
+ kFull_MetricsType
+ };
+
enum {
kHashBits = 8,
kHashCount = 1 << kHashBits,
@@ -208,13 +213,15 @@
// Return the SkGlyph* associated with MakeID. The id parameter is the
// combined glyph/x/y id generated by MakeID. If it is just a glyph id
// then x and y are assumed to be zero.
- SkGlyph* lookupByPackedGlyphID(PackedGlyphID packedGlyphID);
+ SkGlyph* lookupByPackedGlyphID(PackedGlyphID packedGlyphID, MetricsType type);
// Return a SkGlyph* associated with unicode id and position x and y.
- SkGlyph* lookupByChar(SkUnichar id, SkFixed x = 0, SkFixed y = 0);
-
- // Return a new SkGlyph for the glyph ID and subpixel position id.
- SkGlyph* allocateNewGlyph(PackedGlyphID packedGlyphID);
+ SkGlyph* lookupByChar(SkUnichar id, MetricsType type, SkFixed x = 0, SkFixed y = 0);
+
+ // Return a new SkGlyph for the glyph ID and subpixel position id. Limit the amount
+ // of work
+ // using type.
+ SkGlyph* allocateNewGlyph(PackedGlyphID packedGlyphID, MetricsType type);
static bool DetachProc(const SkGlyphCache*, void*) { return true; }
« no previous file with comments | « no previous file | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698