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

Unified Diff: src/gpu/GrGlyph.h

Issue 1093083003: Some simple optimizations for improving GrAtlasTextContext perf (Closed) Base URL: https://skia.googlesource.com/skia.git@atdfregen
Patch Set: simple optimizations Created 5 years, 8 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/GrBatchFontCache.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGlyph.h
diff --git a/src/gpu/GrGlyph.h b/src/gpu/GrGlyph.h
index 2d3e945ddbe3fcd941054ef726da7a6fc84b6ff4..8750c763e528999da3f7376aafe99424f2f024f1 100644
--- a/src/gpu/GrGlyph.h
+++ b/src/gpu/GrGlyph.h
@@ -39,6 +39,7 @@ struct GrGlyph {
GrMaskFormat fMaskFormat;
GrIRect16 fBounds;
SkIPoint16 fAtlasLocation;
+ bool fTooLargeForAtlas;
void init(GrGlyph::PackedID packed, const SkIRect& bounds, GrMaskFormat format) {
fID = GrBatchAtlas::kInvalidAtlasID;
@@ -48,6 +49,7 @@ struct GrGlyph {
fBounds.set(bounds);
fMaskFormat = format;
fAtlasLocation.set(0, 0);
+ fTooLargeForAtlas = GrBatchAtlas::GlyphTooLargeForAtlas(bounds.width(), bounds.height());
}
void free() {
@@ -97,7 +99,7 @@ struct GrGlyph {
}
static inline uint32_t Hash(GrGlyph::PackedID key) {
- return SkChecksum::Murmur3(&key, sizeof(key));
+ return SkChecksum::Mix(key);
}
};
« no previous file with comments | « src/gpu/GrBatchFontCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698