From f16f88b779f802bb3c9892e6f1275fe980e956a1 Mon Sep 17 00:00:00 2001 From: joshualitt Date: Wed, 2 Dec 2015 13:00:37 -0800 Subject: [PATCH] Create a define for nanobench builds to dump stats TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1499453002 --- gyp/common_conditions.gypi | 5 +++++ gyp/common_variables.gypi | 1 + include/gpu/GrConfig.h | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index eb9a6f3..8385a47 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -394,6 +394,11 @@ 'defines': [ 'SK_USE_SDL' ], }], + [ 'skia_dump_stats == 1', + { + 'defines': [ 'SK_DUMP_STATS'], + }], + [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', { 'defines': [ diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi index 64bc29f..56ae72e 100644 --- a/gyp/common_variables.gypi +++ b/gyp/common_variables.gypi @@ -238,6 +238,7 @@ 'skia_egl%': '<(skia_egl)', 'skia_use_sdl%': 0, 'skia_fast%': 0, + 'skia_dump_stats%': 0, 'skia_fast_flags': [ '-O3', # Even for Debug builds. '-march=native', # Use all features of and optimize for THIS machine. diff --git a/include/gpu/GrConfig.h b/include/gpu/GrConfig.h index 86f69bd..ffacb93 100644 --- a/include/gpu/GrConfig.h +++ b/include/gpu/GrConfig.h @@ -33,7 +33,7 @@ */ #if !defined(GR_CACHE_STATS) - #ifdef SK_DEVELOPER + #if defined(SK_DEVELOPER) || defined(SK_DUMP_STATS) #define GR_CACHE_STATS 1 #else #define GR_CACHE_STATS 0 @@ -41,7 +41,7 @@ #endif #if !defined(GR_GPU_STATS) - #ifdef SK_DEVELOPER + #if defined(SK_DEVELOPER) || defined(SK_DUMP_STATS) #define GR_GPU_STATS 1 #else #define GR_GPU_STATS 0 -- 2.7.4