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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1323823003: Remove GrGpuTraceMarker hooks until we rethink the design (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: compiler warning 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/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.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 f3dd2db0bb07888519929895bea2cd67d521b416..3f472d094801da10044291aa80fa709eaf61a6e0 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -36,7 +36,6 @@ GrDrawTarget::GrDrawTarget(GrGpu* gpu, GrResourceProvider* resourceProvider)
: fGpu(SkRef(gpu))
, fCaps(SkRef(gpu->caps()))
, fResourceProvider(resourceProvider)
- , fGpuTraceMarkerCount(0)
, fFlushing(false) {
}
@@ -120,12 +119,8 @@ void GrDrawTarget::flush() {
}
fFlushing = true;
- this->getGpu()->saveActiveTraceMarkers();
-
this->onFlush();
- this->getGpu()->restoreActiveTraceMarkers();
-
fFlushing = false;
this->reset();
}
@@ -394,45 +389,6 @@ void GrDrawTarget::discard(GrRenderTarget* renderTarget) {
}
}
-typedef GrTraceMarkerSet::Iter TMIter;
-void GrDrawTarget::saveActiveTraceMarkers() {
- if (this->caps()->gpuTracingSupport()) {
- SkASSERT(0 == fStoredTraceMarkers.count());
- fStoredTraceMarkers.addSet(fActiveTraceMarkers);
- for (TMIter iter = fStoredTraceMarkers.begin(); iter != fStoredTraceMarkers.end(); ++iter) {
- this->removeGpuTraceMarker(&(*iter));
- }
- }
-}
-
-void GrDrawTarget::restoreActiveTraceMarkers() {
- if (this->caps()->gpuTracingSupport()) {
- SkASSERT(0 == fActiveTraceMarkers.count());
- for (TMIter iter = fStoredTraceMarkers.begin(); iter != fStoredTraceMarkers.end(); ++iter) {
- this->addGpuTraceMarker(&(*iter));
- }
- for (TMIter iter = fActiveTraceMarkers.begin(); iter != fActiveTraceMarkers.end(); ++iter) {
- this->fStoredTraceMarkers.remove(*iter);
- }
- }
-}
-
-void GrDrawTarget::addGpuTraceMarker(const GrGpuTraceMarker* marker) {
- if (this->caps()->gpuTracingSupport()) {
- SkASSERT(fGpuTraceMarkerCount >= 0);
- this->fActiveTraceMarkers.add(*marker);
- ++fGpuTraceMarkerCount;
- }
-}
-
-void GrDrawTarget::removeGpuTraceMarker(const GrGpuTraceMarker* marker) {
- if (this->caps()->gpuTracingSupport()) {
- SkASSERT(fGpuTraceMarkerCount >= 1);
- this->fActiveTraceMarkers.remove(*marker);
- --fGpuTraceMarkerCount;
- }
-}
-
////////////////////////////////////////////////////////////////////////////////
void GrDrawTarget::copySurface(GrSurface* dst,
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698