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

Unified Diff: samplecode/SamplePictFile.cpp

Issue 877113002: use murmur3 finisher to improve font hash efficiency (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add CheapMix helper" Created 5 years, 11 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/SkChecksum.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SamplePictFile.cpp
diff --git a/samplecode/SamplePictFile.cpp b/samplecode/SamplePictFile.cpp
index 3fb335fc3415b02131ab955749415cee6541a698..8f827e10aa248138ad7a2b4409a64e9504e23815 100644
--- a/samplecode/SamplePictFile.cpp
+++ b/samplecode/SamplePictFile.cpp
@@ -30,6 +30,8 @@
#include "SkSurface.h"
#include "SkXMLParser.h"
+#include "SkGlyphCache.h"
+
class PictFileView : public SampleView {
public:
PictFileView(const char name[] = NULL)
@@ -89,12 +91,21 @@ protected:
SkASSERT(static_cast<int>(fBBox) < kBBoxTypeCount);
SkPicture** picture = fPictures + fBBox;
+#ifdef SK_GLYPHCACHE_TRACK_HASH_STATS
+ SkGraphics::PurgeFontCache();
+#endif
+
if (!*picture) {
*picture = LoadPicture(fFilename.c_str(), fBBox);
}
if (*picture) {
canvas->drawPicture(*picture);
}
+
+#ifdef SK_GLYPHCACHE_TRACK_HASH_STATS
+ SkGlyphCache::Dump();
+ SkDebugf("\n");
+#endif
}
private:
« no previous file with comments | « no previous file | src/core/SkChecksum.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698