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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 184443003: Add Gpu Tracing to Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Merge fixes 2 Created 6 years, 9 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/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 35025420793c8e96d7449dfae6d6c78175f1680e..8d3ded2d65c82f33307041a013787c048b562365 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -89,7 +89,7 @@ void GrDrawTarget::DrawInfo::adjustStartIndex(int indexOffset) {
GrDrawTarget::GrDrawTarget(GrContext* context)
: fClip(NULL)
, fContext(context)
- , fPushGpuTraceCount(0) {
+ , fGpuTraceMarkerCount(0) {
SkASSERT(NULL != context);
fDrawState = &fDefaultDrawState;
@@ -578,25 +578,21 @@ void GrDrawTarget::drawPaths(size_t pathCount, const GrPath** paths,
dstCopy.texture() ? &dstCopy : NULL);
}
-void GrDrawTarget::instantGpuTraceEvent(const char* marker) {
+void GrDrawTarget::addGpuTraceMarker(GrGpuTraceMarker* marker) {
if (this->caps()->gpuTracingSupport()) {
- this->onInstantGpuTraceEvent(marker);
+ SkASSERT(fGpuTraceMarkerCount >= 0);
+ this->fActiveTraceMarkers.add(*marker);
+ this->didAddGpuTraceMarker();
+ ++fGpuTraceMarkerCount;
}
}
-void GrDrawTarget::pushGpuTraceEvent(const char* marker) {
- SkASSERT(fPushGpuTraceCount >= 0);
+void GrDrawTarget::removeGpuTraceMarker(GrGpuTraceMarker* marker) {
if (this->caps()->gpuTracingSupport()) {
- this->onPushGpuTraceEvent(marker);
- ++fPushGpuTraceCount;
- }
-}
-
-void GrDrawTarget::popGpuTraceEvent() {
- SkASSERT(fPushGpuTraceCount >= 1);
- if (this->caps()->gpuTracingSupport()) {
- this->onPopGpuTraceEvent();
- --fPushGpuTraceCount;
+ SkASSERT(fGpuTraceMarkerCount >= 1);
+ this->fActiveTraceMarkers.remove(*marker);
+ this->didRemoveGpuTraceMarker();
+ --fGpuTraceMarkerCount;
}
}
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698