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*);
fShaderCompilations = 0;
fTextureCreates = 0;
fTextureUploads = 0;
+ fStencilBufferCreates = 0;
}
int renderTargetBinds() const { return fRenderTargetBinds; }
void incTextureCreates() { fTextureCreates++; }
int textureUploads() const { return fTextureUploads; }
void incTextureUploads() { fTextureUploads++; }
+ void incStencilBufferCreates() { fStencilBufferCreates++; }
void dump(SkString*);
private:
int fShaderCompilations;
int fTextureCreates;
int fTextureUploads;
+ int fStencilBufferCreates;
#else
void dump(SkString*) {};
void incRenderTargetBinds() {}
void incShaderCompilations() {}
void incTextureCreates() {}
void incTextureUploads() {}
+ void incStencilBufferCreates() {}
#endif
};
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
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;