diff options
author | 2012-09-13 15:40:37 +0000 | |
---|---|---|
committer | 2012-09-13 15:40:37 +0000 | |
commit | 163c84ba5026907fea7b4f4bdcf8b16c13103adc (patch) | |
tree | 77edf07987586987f8ff2dac66b339d8ba711a3e /tools | |
parent | 69fbc52e95bb8ff2df76de09ca872fd62caf2480 (diff) |
Added GPU resource cache stats printing to render_pictures
https://codereview.appspot.com/6492104/
git-svn-id: http://skia.googlecode.com/svn/trunk@5523 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rw-r--r-- | tools/PictureRenderer.h | 4 | ||||
-rw-r--r-- | tools/render_pictures_main.cpp | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h index afcd7f08b0..9eeb03d767 100644 --- a/tools/PictureRenderer.h +++ b/tools/PictureRenderer.h @@ -79,6 +79,10 @@ public: return NULL; } } + + GrContext* getGrContext() { + return fGrContext; + } #endif PictureRenderer() diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp index 976441dd0a..5ec2ede3e7 100644 --- a/tools/render_pictures_main.cpp +++ b/tools/render_pictures_main.cpp @@ -289,6 +289,16 @@ int main(int argc, char* const argv[]) { process_input(inputs[i], outputDir, *renderer); } +#if SK_SUPPORT_GPU +#if GR_CACHE_STATS + if (renderer->isUsingGpuDevice()) { + GrContext* ctx = renderer->getGrContext(); + + ctx->printCacheStats(); + } +#endif +#endif + SkDELETE(renderer); SkGraphics::Term(); } |