Create a define for nanobench builds to dump stats
authorjoshualitt <joshualitt@chromium.org>
Wed, 2 Dec 2015 21:00:37 +0000 (13:00 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 2 Dec 2015 21:00:37 +0000 (13:00 -0800)
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1499453002

gyp/common_conditions.gypi
gyp/common_variables.gypi
include/gpu/GrConfig.h

index eb9a6f3..8385a47 100644 (file)
         'defines': [ 'SK_USE_SDL' ],
     }],
 
+    [ 'skia_dump_stats == 1',
+      {
+        'defines': [ 'SK_DUMP_STATS'],
+    }],
+
     [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]',
       {
         'defines': [
index 64bc29f..56ae72e 100644 (file)
     '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.
index 86f69bd..ffacb93 100644 (file)
@@ -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