OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |