aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGlyph.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-04-21 10:07:26 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-21 10:07:26 -0700
commit010db5346e425be8ce659b23b75943ee8ef9d537 (patch)
treec3165e75f24da099b7509a73020c4389e2d0c6c6 /src/gpu/GrGlyph.h
parent409fd66a5afcef5f165f7ccec7c3473add231752 (diff)
Some simple optimizations for improving GrAtlasTextContext perf
Diffstat (limited to 'src/gpu/GrGlyph.h')
-rw-r--r--src/gpu/GrGlyph.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/GrGlyph.h b/src/gpu/GrGlyph.h
index 2d3e945ddb..8750c763e5 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);
}
};