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

Unified Diff: src/gpu/GrContext.cpp

Issue 1302663003: Sample for GPU memory dumping using new SkTraceMemoryDump. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/core/SkTraceMemoryDump.h ('k') | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 91415ac2b4a676aee09d7cbd6c47f88dc50fc3b6..149a5aef68b341111d2796564b5a55a90fbf7e28 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -45,6 +45,7 @@
#include "SkTLazy.h"
#include "SkTLS.h"
#include "SkTraceEvent.h"
+#include "SkTraceMemoryDump.h"
#include "batches/GrBatch.h"
@@ -67,7 +68,7 @@ void GrContext::DrawingMgr::init(GrContext* context) {
fDrawTarget = SkNEW_ARGS(GrImmediateDrawTarget, (context));
#else
fDrawTarget = SkNEW_ARGS(GrBufferedDrawTarget, (context));
-#endif
+#endif
}
void GrContext::DrawingMgr::cleanup() {
@@ -112,7 +113,7 @@ void GrContext::DrawingMgr::flush() {
}
}
-GrDrawContext* GrContext::DrawingMgr::drawContext(const SkSurfaceProps* surfaceProps) {
+GrDrawContext* GrContext::DrawingMgr::drawContext(const SkSurfaceProps* surfaceProps) {
if (this->abandoned()) {
return NULL;
}
@@ -125,7 +126,7 @@ GrDrawContext* GrContext::DrawingMgr::drawContext(const SkSurfaceProps* surfaceP
SkNEW_ARGS(GrDrawContext, (fContext, fDrawTarget, props));
}
- return fDrawContext[props.pixelGeometry()][props.isUseDistanceFieldFonts()];
+ return fDrawContext[props.pixelGeometry()][props.isUseDistanceFieldFonts()];
}
////////////////////////////////////////////////////////////////////////////////
@@ -761,3 +762,7 @@ void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) {
fGpu->removeGpuTraceMarker(marker);
}
+//////////////////////////////////////////////////////////////////////////////
+void GrContext::onMemoryDump(SkTraceMemoryDump *traceMemoryDump) const {
+ fResourceCache->onMemoryDump(traceMemoryDump);
+}
« no previous file with comments | « src/core/SkTraceMemoryDump.h ('k') | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698