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

Unified Diff: src/gpu/GrDrawTarget.h

Issue 341583002: Modify gpu debug markers to store gpu device markers when a flush occurs. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.h
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index bbaf5a96762e8cc7015711e99a17652a638dca2e..7898dfdcab66fedc1083c3099e12c5cc5f326c0b 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -448,8 +448,19 @@ public:
* GR_CREATE_GPU_TRACE_MARKER(marker_str, target) will automatically call these at the start
* and end of a code block respectively
*/
- void addGpuTraceMarker(GrGpuTraceMarker* marker);
- void removeGpuTraceMarker(GrGpuTraceMarker* marker);
+ void addGpuTraceMarker(const GrGpuTraceMarker* marker);
+ void removeGpuTraceMarker(const GrGpuTraceMarker* marker);
+
+ /**
+ * Takes the current active set of markers and stores them for later use. Any current marker
+ * in the active set is removed from the active set and the targets remove function is called.
+ * These functions do not work as a stack so you cannot call save a second time before calling
+ * restore. Also, it is assumed that when restore is called the current active set of markers
+ * is empty. When the stored markers are added back into the active set, the targets add marker
+ * is called.
+ */
+ void saveActiveTraceMarkers();
+ void restoreActiveTraceMarkers();
/**
* Copies a pixel rectangle from one surface to another. This call may finalize
@@ -942,6 +953,7 @@ private:
// To keep track that we always have at least as many debug marker adds as removes
int fGpuTraceMarkerCount;
GrTraceMarkerSet fActiveTraceMarkers;
+ GrTraceMarkerSet fStoredTraceMarkers;
typedef SkRefCnt INHERITED;
};
« no previous file with comments | « no previous file | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698