Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: src/gpu/GrGpu.h

Issue 891973002: Add texture create/upload stats and make nanobench have explicit gpu stats flag (Closed) Base URL: https://skia.googlesource.com/skia.git@lala
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/nanobench.cpp ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.h
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index c98958911746bf0ee60dfa9894da19dc9befc558..8c458f18e87155e606a7f5ed13a6702eb533b31b 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
};
« no previous file with comments | « bench/nanobench.cpp ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698