aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/bench_pictures_main.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-04 16:43:38 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-04 16:43:38 +0000
commitcf2f00872c559c892bb4b466bf678c7667490cce (patch)
tree63761e3d9c72345055e0ea858c7d2cc5a4c2cc93 /tools/bench_pictures_main.cpp
parent3eb77e4d5a381fa55197f6bd03c599e709146069 (diff)
SkDiscardableMemoryPool to abstract class
Motivation - we want to keep our public headers small. R=scroggo@google.com, reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/223403012 git-svn-id: http://skia.googlecode.com/svn/trunk@14063 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/bench_pictures_main.cpp')
-rw-r--r--tools/bench_pictures_main.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/bench_pictures_main.cpp b/tools/bench_pictures_main.cpp
index 5829e1822f..4952571fad 100644
--- a/tools/bench_pictures_main.cpp
+++ b/tools/bench_pictures_main.cpp
@@ -46,8 +46,8 @@ DEFINE_bool(purgeDecodedTex, false, "Purge decoded and GPU-uploaded textures "
DEFINE_string(timers, "c", "[wcgWC]*: Display wall, cpu, gpu, truncated wall or truncated cpu time"
" for each picture.");
DEFINE_bool(trackDeferredCaching, false, "Only meaningful with --deferImageDecoding and "
- "LAZY_CACHE_STATS set to true. Report percentage of cache hits when using deferred "
- "image decoding.");
+ "SK_LAZY_CACHE_STATS set to true. Report percentage of cache hits when using "
+ "deferred image decoding.");
static char const * const gFilterTypes[] = {
"paint",
@@ -142,7 +142,7 @@ static SkString filterFlagsUsage() {
return result;
}
-#if LAZY_CACHE_STATS
+#if SK_LAZY_CACHE_STATS
static int32_t gTotalCacheHits;
static int32_t gTotalCacheMisses;
#endif
@@ -192,11 +192,11 @@ static bool run_single_benchmark(const SkString& inputPath,
benchmark.run(picture);
-#if LAZY_CACHE_STATS
+#if SK_LAZY_CACHE_STATS
if (FLAGS_trackDeferredCaching) {
- int32_t cacheHits = pool->fCacheHits;
- int32_t cacheMisses = pool->fCacheMisses;
- pool->fCacheHits = pool->fCacheMisses = 0;
+ int cacheHits = pool->getCacheHits();
+ int cacheMisses = pool->getCacheMisses();
+ pool->resetCacheHitsAndMisses();
SkString hitString;
hitString.printf("Cache hit rate: %f\n", (double) cacheHits / (cacheHits + cacheMisses));
gLogger.logProgress(hitString);
@@ -435,7 +435,7 @@ int tool_main(int argc, char** argv) {
gLogger.logError(err);
return 1;
}
-#if LAZY_CACHE_STATS
+#if SK_LAZY_CACHE_STATS
if (FLAGS_trackDeferredCaching) {
SkDebugf("Total cache hit rate: %f\n",
(double) gTotalCacheHits / (gTotalCacheHits + gTotalCacheMisses));