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

Unified Diff: src/svg/SkSVGDevice.cpp

Issue 1021033002: Some usability ideas around SkTHash. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor tweaks Created 5 years, 9 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/gl/GrGLCaps.h ('k') | tests/ChecksumTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/svg/SkSVGDevice.cpp
diff --git a/src/svg/SkSVGDevice.cpp b/src/svg/SkSVGDevice.cpp
index 45e616b3f618b2717fb4fadb31690da12bcbf49c..8d2f18a486a89baca2212cc3878b6bf7bca6ef34 100644
--- a/src/svg/SkSVGDevice.cpp
+++ b/src/svg/SkSVGDevice.cpp
@@ -103,12 +103,6 @@ static SkString svg_transform(const SkMatrix& t) {
return tstr;
}
-uint32_t hash_family_string(const SkString& family) {
- // This is a lame hash function, but we don't really expect to see more than 1-2
- // family names under normal circumstances.
- return SkChecksum::Mix(SkToU32(family.size()));
-}
-
struct Resources {
Resources(const SkPaint& paint)
: fPaintServer(svg_color(paint.getColor())) {}
@@ -538,7 +532,7 @@ void SkSVGDevice::AutoElement::addTextAttributes(const SkPaint& paint) {
}
SkString familyName;
- SkTHashSet<SkString, hash_family_string> familySet;
+ SkTHashSet<SkString> familySet;
SkAutoTUnref<const SkTypeface> tface(paint.getTypeface() ?
SkRef(paint.getTypeface()) : SkTypeface::RefDefault());
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | tests/ChecksumTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698