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

Unified Diff: src/gpu/gl/GrGLTexture.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/GrGLTexture.h ('k') | src/gpu/gl/GrGLTextureRenderTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLTexture.cpp
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index f855e5458bedfc84d8a5ea0cdffd17b55d3f3eda..6f70d51a341279cfa62d618f341433bff015d42a 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -7,6 +7,7 @@
#include "GrGLTexture.h"
#include "GrGLGpu.h"
+#include "SkTraceMemoryDump.h"
#define GPUGL static_cast<GrGLGpu*>(this->getGpu())
#define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X)
@@ -51,3 +52,11 @@ void GrGLTexture::onAbandon() {
GrBackendObject GrGLTexture::getTextureHandle() const {
return static_cast<GrBackendObject>(this->textureID());
}
+
+void GrGLTexture::setMemoryBacking(SkTraceMemoryDump* traceMemoryDump,
+ const SkString& dumpName) const {
+ SkString texture_id;
+ texture_id.appendU32(this->textureID());
+ traceMemoryDump->setMemoryBacking(dumpName.c_str(), "gl_texture",
+ texture_id.c_str());
+}
« no previous file with comments | « src/gpu/gl/GrGLTexture.h ('k') | src/gpu/gl/GrGLTextureRenderTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698