aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawTarget.h
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2014-06-18 13:09:11 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-18 13:09:11 -0700
commit3eee3834fba1d2e29dfb61adcb97e4624b6a3ac8 (patch)
treec886edc991300cac6a6da68c396597df04103ae1 /src/gpu/GrDrawTarget.h
parent1d7975b1c0449f9de0825df2a00951f0173a56a0 (diff)
Modify gpu debug markers to store gpu device markers when a flush occurs.
BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/341583002
Diffstat (limited to 'src/gpu/GrDrawTarget.h')
-rw-r--r--src/gpu/GrDrawTarget.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index bbaf5a9676..7898dfdcab 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;
};