diff options
author | bsalomon <bsalomon@google.com> | 2015-02-23 10:01:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-23 10:01:36 -0800 |
commit | 9e5fc72d638af5740b0b12a0ec12cf1f561f6a4d (patch) | |
tree | 0be9d80d9a75f6280d4cf1d527b02f82e0a8bdde /src | |
parent | 088302756bde25083d6712b18dcd24644d4dcdbb (diff) |
Add stencil buffer create tracking to GPU stats.
Review URL: https://codereview.chromium.org/949953002
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrClipMaskManager.h | 5 | ||||
-rw-r--r-- | src/gpu/GrGpu.h | 4 | ||||
-rw-r--r-- | src/gpu/GrTest.cpp | 1 | ||||
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 2 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h index bc164da36e..7fcfa50c4e 100644 --- a/src/gpu/GrClipMaskManager.h +++ b/src/gpu/GrClipMaskManager.h @@ -166,9 +166,8 @@ private: void setupCache(const SkClipStack& clip, const SkIRect& bounds); /** - * Called prior to return control back the GrGpu in setupClipping. It - * updates the GrGpu with stencil settings that account stencil-based - * clipping. + * Called prior to return control back the GrGpu in setupClipping. It updates the + * GrPipelineBuilder with stencil settings that account for stencil-based clipping. */ void setPipelineBuilderStencil(GrPipelineBuilder*, GrPipelineBuilder::AutoRestoreStencil*); diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h index eb97b4fa08..95bbc6e750 100644 --- a/src/gpu/GrGpu.h +++ b/src/gpu/GrGpu.h @@ -358,6 +358,7 @@ public: fShaderCompilations = 0; fTextureCreates = 0; fTextureUploads = 0; + fStencilBufferCreates = 0; } int renderTargetBinds() const { return fRenderTargetBinds; } @@ -368,6 +369,7 @@ public: void incTextureCreates() { fTextureCreates++; } int textureUploads() const { return fTextureUploads; } void incTextureUploads() { fTextureUploads++; } + void incStencilBufferCreates() { fStencilBufferCreates++; } void dump(SkString*); private: @@ -375,12 +377,14 @@ public: int fShaderCompilations; int fTextureCreates; int fTextureUploads; + int fStencilBufferCreates; #else void dump(SkString*) {}; void incRenderTargetBinds() {} void incShaderCompilations() {} void incTextureCreates() {} void incTextureUploads() {} + void incStencilBufferCreates() {} #endif }; diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp index 9ddc97d834..d5fb532d1c 100644 --- a/src/gpu/GrTest.cpp +++ b/src/gpu/GrTest.cpp @@ -72,6 +72,7 @@ void GrGpu::Stats::dump(SkString* out) { out->appendf("Shader Compilations: %d\n", fShaderCompilations); out->appendf("Textures Created: %d\n", fTextureCreates); out->appendf("Texture Uploads: %d\n", fTextureUploads); + out->appendf("Stencil Buffer Creates: %d\n", fStencilBufferCreates); } #endif diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 9c0f772f41..a952c4f768 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -1172,7 +1172,7 @@ bool GrGLGpu::createStencilBufferForRenderTarget(GrRenderTarget* rt, int width, created = (GR_GL_NO_ERROR == check_alloc_error(rt->desc(), this->glInterface())); } if (created) { - + fStats.incStencilBufferCreates(); // After sized formats we attempt an unsized format and take // whatever sizes GL gives us. In that case we query for the size. GrGLStencilBuffer::Format format = sFmt; |