Index: src/gpu/gl/GrGLIndexBuffer.cpp |
diff --git a/src/gpu/gl/GrGLIndexBuffer.cpp b/src/gpu/gl/GrGLIndexBuffer.cpp |
index d60d391085e7b501823145e934ef6dd6821370d8..230d9a46933ac757c2fe71662c80cda1be409be3 100644 |
--- a/src/gpu/gl/GrGLIndexBuffer.cpp |
+++ b/src/gpu/gl/GrGLIndexBuffer.cpp |
@@ -7,6 +7,7 @@ |
#include "GrGLIndexBuffer.h" |
#include "GrGLGpu.h" |
+#include "SkTraceMemoryDump.h" |
GrGLIndexBuffer::GrGLIndexBuffer(GrGLGpu* gpu, const Desc& desc) |
: INHERITED(gpu, desc.fSizeInBytes, desc.fDynamic, 0 == desc.fID) |
@@ -48,3 +49,11 @@ bool GrGLIndexBuffer::onUpdateData(const void* src, size_t srcSizeInBytes) { |
return false; |
} |
} |
+ |
+void GrGLIndexBuffer::setMemoryBacking(SkTraceMemoryDump* traceMemoryDump, |
+ const SkString& dumpName) const { |
+ SkString buffer_id; |
+ buffer_id.appendU32(this->bufferID()); |
+ traceMemoryDump->setMemoryBacking(dumpName.c_str(), "gl_buffer", |
+ buffer_id.c_str()); |
+} |