diff options
author | 2015-02-02 21:19:50 -0800 | |
---|---|---|
committer | 2015-02-02 21:19:50 -0800 | |
commit | b12ea41286ce36e085c5a14711da0cf9f240fdf1 (patch) | |
tree | b15b05bd994299e18753a1bb7d37942e447f22a5 /src/gpu/GrGpu.h | |
parent | 9bf4e5bbf6ca96042c0e0f5dca9a52a943f25716 (diff) |
Add texture create/upload stats and make nanobench have explicit gpu stats flag
Review URL: https://codereview.chromium.org/891973002
Diffstat (limited to 'src/gpu/GrGpu.h')
-rw-r--r-- | src/gpu/GrGpu.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h index c989589117..8c458f18e8 100644 --- a/src/gpu/GrGpu.h +++ b/src/gpu/GrGpu.h @@ -369,21 +369,34 @@ public: #if GR_GPU_STATS Stats() { this->reset(); } - void reset() { fRenderTargetBinds = 0; fShaderCompilations = 0; } + void reset() { + fRenderTargetBinds = 0; + fShaderCompilations = 0; + fTextureCreates = 0; + fTextureUploads = 0; + } int renderTargetBinds() const { return fRenderTargetBinds; } void incRenderTargetBinds() { fRenderTargetBinds++; } int shaderCompilations() const { return fShaderCompilations; } void incShaderCompilations() { fShaderCompilations++; } + int textureCreates() const { return fTextureCreates; } + void incTextureCreates() { fTextureCreates++; } + int textureUploads() const { return fTextureUploads; } + void incTextureUploads() { fTextureUploads++; } void dump(SkString*); private: int fRenderTargetBinds; int fShaderCompilations; + int fTextureCreates; + int fTextureUploads; #else void dump(SkString*) {}; void incRenderTargetBinds() {} void incShaderCompilations() {} + void incTextureCreates() {} + void incTextureUploads() {} #endif }; |