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

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

Issue 378933002: Improve gpu tracing when applying markers directly to gpu target (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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/GrContext.cpp ('k') | src/gpu/GrTraceMarker.h » ('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 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrInOrderDrawBuffer.h" 8 #include "GrInOrderDrawBuffer.h"
9 9
10 #include "GrBufferAllocPool.h" 10 #include "GrBufferAllocPool.h"
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 StencilPathAllocator::Iter stencilPathIter(&fStencilPaths); 588 StencilPathAllocator::Iter stencilPathIter(&fStencilPaths);
589 DrawPathAllocator::Iter drawPathIter(&fDrawPath); 589 DrawPathAllocator::Iter drawPathIter(&fDrawPath);
590 DrawPathsAllocator::Iter drawPathsIter(&fDrawPaths); 590 DrawPathsAllocator::Iter drawPathsIter(&fDrawPaths);
591 CopySurfaceAllocator::Iter copySurfaceIter(&fCopySurfaces); 591 CopySurfaceAllocator::Iter copySurfaceIter(&fCopySurfaces);
592 592
593 int currCmdMarker = 0; 593 int currCmdMarker = 0;
594 594
595 fDstGpu->saveActiveTraceMarkers(); 595 fDstGpu->saveActiveTraceMarkers();
596 for (int c = 0; c < numCmds; ++c) { 596 for (int c = 0; c < numCmds; ++c) {
597 GrGpuTraceMarker newMarker("", -1); 597 GrGpuTraceMarker newMarker("", -1);
598 SkString traceString;
598 if (cmd_has_trace_marker(fCmds[c])) { 599 if (cmd_has_trace_marker(fCmds[c])) {
599 SkString traceString = fGpuCmdMarkers[currCmdMarker].toString(); 600 traceString = fGpuCmdMarkers[currCmdMarker].toString();
600 newMarker.fMarker = traceString.c_str(); 601 newMarker.fMarker = traceString.c_str();
601 fDstGpu->addGpuTraceMarker(&newMarker); 602 fDstGpu->addGpuTraceMarker(&newMarker);
602 ++currCmdMarker; 603 ++currCmdMarker;
603 } 604 }
604 switch (strip_trace_bit(fCmds[c])) { 605 switch (strip_trace_bit(fCmds[c])) {
605 case kDraw_Cmd: { 606 case kDraw_Cmd: {
606 SkASSERT(fDstGpu->drawState() != prevDrawState); 607 SkASSERT(fDstGpu->drawState() != prevDrawState);
607 SkAssertResult(drawIter.next()); 608 SkAssertResult(drawIter.next());
608 fDstGpu->setVertexSourceToBuffer(drawIter->fVertexBuffer); 609 fDstGpu->setVertexSourceToBuffer(drawIter->fVertexBuffer);
609 if (drawIter->isIndexed()) { 610 if (drawIter->isIndexed()) {
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 GrInOrderDrawBuffer::CopySurface* GrInOrderDrawBuffer::recordCopySurface() { 988 GrInOrderDrawBuffer::CopySurface* GrInOrderDrawBuffer::recordCopySurface() {
988 this->addToCmdBuffer(kCopySurface_Cmd); 989 this->addToCmdBuffer(kCopySurface_Cmd);
989 return &fCopySurfaces.push_back(); 990 return &fCopySurfaces.push_back();
990 } 991 }
991 992
992 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { 993 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) {
993 INHERITED::clipWillBeSet(newClipData); 994 INHERITED::clipWillBeSet(newClipData);
994 fClipSet = true; 995 fClipSet = true;
995 fClipProxyState = kUnknown_ClipProxyState; 996 fClipProxyState = kUnknown_ClipProxyState;
996 } 997 }
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrTraceMarker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698