| Index: src/gpu/GrDrawTarget.cpp
|
| diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
|
| index fb4c9a1509a4ffffce549d8fe3116c88f373b10e..74b1f3ada992f7a7710bb4b94394e3dbec2366d3 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;
|
| @@ -548,25 +548,25 @@ void GrDrawTarget::drawPath(const GrPath* path, SkPath::FillType fill) {
|
| this->onDrawPath(path, fill, dstCopy.texture() ? &dstCopy : NULL);
|
| }
|
|
|
| -void GrDrawTarget::instantGpuTraceEvent(const char* marker) {
|
| - if (this->caps()->gpuTracingSupport()) {
|
| - this->onInstantGpuTraceEvent(marker);
|
| - }
|
| +bool GrDrawTarget::isGpuTracingEnabled() const {
|
| + return this->getContext()->isGpuTracingEnabled();
|
| }
|
|
|
| -void GrDrawTarget::pushGpuTraceEvent(const char* marker) {
|
| - SkASSERT(fPushGpuTraceCount >= 0);
|
| +void GrDrawTarget::addGpuTraceMarker(GrGpuTraceMarker* marker) {
|
| if (this->caps()->gpuTracingSupport()) {
|
| - this->onPushGpuTraceEvent(marker);
|
| - ++fPushGpuTraceCount;
|
| + SkASSERT(fGpuTraceMarkerCount >= 0);
|
| + this->fActiveTraceMarkers.add(*marker);
|
| + this->didAddGpuTraceMarker();
|
| + ++fGpuTraceMarkerCount;
|
| }
|
| }
|
|
|
| -void GrDrawTarget::popGpuTraceEvent() {
|
| - SkASSERT(fPushGpuTraceCount >= 1);
|
| +void GrDrawTarget::removeGpuTraceMarker(GrGpuTraceMarker* marker) {
|
| if (this->caps()->gpuTracingSupport()) {
|
| - this->onPopGpuTraceEvent();
|
| - --fPushGpuTraceCount;
|
| + SkASSERT(fGpuTraceMarkerCount >= 1);
|
| + this->fActiveTraceMarkers.remove(*marker);
|
| + this->didRemoveGpuTraceMarker();
|
| + --fGpuTraceMarkerCount;
|
| }
|
| }
|
|
|
|
|