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

Unified Diff: include/gpu/GrContext.h

Issue 886233004: Print gpu/cache stats from DM. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor 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
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index e6fdeb89f7771db4c0f18b15241abe76c13a1927..bc46b198ad8de14345917f2353e02418786bee37 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -795,33 +795,13 @@ public:
*/
const Options& getOptions() const { return fOptions; }
-#if GR_CACHE_STATS
+ /** Prints cache stats to the string if GR_CACHE_STATS == 1. */
+ void dumpCacheStats(SkString*) const;
void printCacheStats() const;
-#endif
-
- class GPUStats {
- public:
-#if GR_GPU_STATS
- GPUStats() { this->reset(); }
- void reset() { fRenderTargetBinds = 0; fShaderCompilations = 0; }
-
- int renderTargetBinds() const { return fRenderTargetBinds; }
- void incRenderTargetBinds() { fRenderTargetBinds++; }
- int shaderCompilations() const { return fShaderCompilations; }
- void incShaderCompilations() { fShaderCompilations++; }
- private:
- int fRenderTargetBinds;
- int fShaderCompilations;
-#else
- void incRenderTargetBinds() {}
- void incShaderCompilations() {}
-#endif
- };
-
-#if GR_GPU_STATS
- const GPUStats* gpuStats() const;
-#endif
+ /** Prints GPU stats to the string if GR_GPU_STATS == 1. */
+ void dumpGpuStats(SkString*) const;
+ void printGpuStats() const;
private:
GrGpu* fGpu;

Powered by Google App Engine
This is Rietveld 408576698