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

Unified Diff: src/gpu/gl/GrGLVertexBuffer.cpp

Issue 1313743002: Add onMemoryDump to GrContext (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Small build fix Created 5 years, 3 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
« no previous file with comments | « src/gpu/gl/GrGLVertexBuffer.h ('k') | tools/BUILD.public.expected » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLVertexBuffer.cpp
diff --git a/src/gpu/gl/GrGLVertexBuffer.cpp b/src/gpu/gl/GrGLVertexBuffer.cpp
index cd9d52a2800db29b31b27ea53dfcda31fb51d8fb..1f8951654f92b50091d5deac5953a779f176b11b 100644
--- a/src/gpu/gl/GrGLVertexBuffer.cpp
+++ b/src/gpu/gl/GrGLVertexBuffer.cpp
@@ -7,6 +7,7 @@
#include "GrGLVertexBuffer.h"
#include "GrGLGpu.h"
+#include "SkTraceMemoryDump.h"
GrGLVertexBuffer::GrGLVertexBuffer(GrGLGpu* gpu, const Desc& desc)
: INHERITED(gpu, desc.fSizeInBytes, desc.fDynamic, 0 == desc.fID)
@@ -48,3 +49,11 @@ bool GrGLVertexBuffer::onUpdateData(const void* src, size_t srcSizeInBytes) {
return false;
}
}
+
+void GrGLVertexBuffer::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());
+}
« no previous file with comments | « src/gpu/gl/GrGLVertexBuffer.h ('k') | tools/BUILD.public.expected » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698