aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLTexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGLTexture.cpp')
-rw-r--r--src/gpu/gl/GrGLTexture.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index 61bce35061..69b214de27 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -138,21 +138,16 @@ void GrGLTexture::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const
// Dump as skia/gpu_resources/resource_#/texture, to avoid conflicts in the
// GrGLTextureRenderTarget case, where multiple things may dump to the same resource. This
// has no downside in the normal case.
- SkString dumpName("skia/gpu_resources/resource_");
- dumpName.appendU32(this->uniqueID().asUInt());
- dumpName.append("/texture");
+ SkString resourceName = this->getResourceName();
+ resourceName.append("/texture");
// As we are only dumping our texture memory (not any additional memory tracked by classes
// which may inherit from us), specifically call GrGLTexture::gpuMemorySize to avoid
// hitting an override.
- size_t size = GrGLTexture::gpuMemorySize();
- traceMemoryDump->dumpNumericValue(dumpName.c_str(), "size", "bytes", size);
-
- if (this->isPurgeable()) {
- traceMemoryDump->dumpNumericValue(dumpName.c_str(), "purgeable_size", "bytes", size);
- }
+ this->dumpMemoryStatisticsPriv(traceMemoryDump, resourceName, "Texture",
+ GrGLTexture::gpuMemorySize());
SkString texture_id;
texture_id.appendU32(this->textureID());
- traceMemoryDump->setMemoryBacking(dumpName.c_str(), "gl_texture", texture_id.c_str());
+ traceMemoryDump->setMemoryBacking(resourceName.c_str(), "gl_texture", texture_id.c_str());
}