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

Side by Side Diff: src/gpu/GrDrawTarget.cpp

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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 571
572 GrDeviceCoordTexture dstCopy; 572 GrDeviceCoordTexture dstCopy;
573 if (!this->setupDstReadIfNecessary(&dstCopy, &devBounds)) { 573 if (!this->setupDstReadIfNecessary(&dstCopy, &devBounds)) {
574 return; 574 return;
575 } 575 }
576 576
577 this->onDrawPaths(pathCount, paths, transforms, fill, stroke, 577 this->onDrawPaths(pathCount, paths, transforms, fill, stroke,
578 dstCopy.texture() ? &dstCopy : NULL); 578 dstCopy.texture() ? &dstCopy : NULL);
579 } 579 }
580 580
581 void GrDrawTarget::addGpuTraceMarker(GrGpuTraceMarker* marker) { 581 typedef GrTraceMarkerSet::Iter TMIter;
582 void GrDrawTarget::saveActiveTraceMarkers() {
583 if (this->caps()->gpuTracingSupport()) {
584 SkASSERT(0 == fStoredTraceMarkers.count());
585 fStoredTraceMarkers.addSet(fActiveTraceMarkers);
586 for (TMIter iter = fStoredTraceMarkers.begin(); iter != fStoredTraceMark ers.end(); ++iter) {
587 this->removeGpuTraceMarker(&(*iter));
588 }
589 }
590 }
591
592 void GrDrawTarget::restoreActiveTraceMarkers() {
593 if (this->caps()->gpuTracingSupport()) {
594 SkASSERT(0 == fActiveTraceMarkers.count());
595 for (TMIter iter = fStoredTraceMarkers.begin(); iter != fStoredTraceMark ers.end(); ++iter) {
596 this->addGpuTraceMarker(&(*iter));
597 }
598 for (TMIter iter = fActiveTraceMarkers.begin(); iter != fActiveTraceMark ers.end(); ++iter) {
599 this->fStoredTraceMarkers.remove(*iter);
600 }
601 }
602 }
603
604 void GrDrawTarget::addGpuTraceMarker(const GrGpuTraceMarker* marker) {
582 if (this->caps()->gpuTracingSupport()) { 605 if (this->caps()->gpuTracingSupport()) {
583 SkASSERT(fGpuTraceMarkerCount >= 0); 606 SkASSERT(fGpuTraceMarkerCount >= 0);
584 this->fActiveTraceMarkers.add(*marker); 607 this->fActiveTraceMarkers.add(*marker);
585 this->didAddGpuTraceMarker(); 608 this->didAddGpuTraceMarker();
586 ++fGpuTraceMarkerCount; 609 ++fGpuTraceMarkerCount;
587 } 610 }
588 } 611 }
589 612
590 void GrDrawTarget::removeGpuTraceMarker(GrGpuTraceMarker* marker) { 613 void GrDrawTarget::removeGpuTraceMarker(const GrGpuTraceMarker* marker) {
591 if (this->caps()->gpuTracingSupport()) { 614 if (this->caps()->gpuTracingSupport()) {
592 SkASSERT(fGpuTraceMarkerCount >= 1); 615 SkASSERT(fGpuTraceMarkerCount >= 1);
593 this->fActiveTraceMarkers.remove(*marker); 616 this->fActiveTraceMarkers.remove(*marker);
594 this->didRemoveGpuTraceMarker(); 617 this->didRemoveGpuTraceMarker();
595 --fGpuTraceMarkerCount; 618 --fGpuTraceMarkerCount;
596 } 619 }
597 } 620 }
598 621
599 //////////////////////////////////////////////////////////////////////////////// 622 ////////////////////////////////////////////////////////////////////////////////
600 623
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 1158 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
1136 1159
1137 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 1160 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
1138 r.appendf("%s is uploadable to a texture: %s\n", 1161 r.appendf("%s is uploadable to a texture: %s\n",
1139 kConfigNames[i], 1162 kConfigNames[i],
1140 gNY[fConfigTextureSupport[i]]); 1163 gNY[fConfigTextureSupport[i]]);
1141 } 1164 }
1142 1165
1143 return r; 1166 return r;
1144 } 1167 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698