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 "GrDefaultGeoProcFactory.h" | 10 #include "GrDefaultGeoProcFactory.h" |
11 #include "GrDrawTargetCaps.h" | 11 #include "GrDrawTargetCaps.h" |
12 #include "GrGpu.h" | 12 #include "GrGpu.h" |
13 #include "GrTemplates.h" | 13 #include "GrTemplates.h" |
14 #include "GrTextStrike.h" | 14 #include "GrFontCache.h" |
15 #include "GrTexture.h" | 15 #include "GrTexture.h" |
16 | 16 |
17 GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrGpu* gpu, | 17 GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrGpu* gpu, |
18 GrVertexBufferAllocPool* vertexPool, | 18 GrVertexBufferAllocPool* vertexPool, |
19 GrIndexBufferAllocPool* indexPool) | 19 GrIndexBufferAllocPool* indexPool) |
20 : INHERITED(gpu, vertexPool, indexPool) | 20 : INHERITED(gpu, vertexPool, indexPool) |
21 , fCmdBuffer(kCmdBufferInitialSizeInBytes) | 21 , fCmdBuffer(kCmdBufferInitialSizeInBytes) |
22 , fPrevState(NULL) | 22 , fPrevState(NULL) |
23 , fDrawID(0) { | 23 , fDrawID(0) { |
24 | 24 |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 | 502 |
503 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary() { | 503 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary() { |
504 SkASSERT(!fCmdBuffer.empty()); | 504 SkASSERT(!fCmdBuffer.empty()); |
505 SkASSERT(!cmd_has_trace_marker(fCmdBuffer.back().fType)); | 505 SkASSERT(!cmd_has_trace_marker(fCmdBuffer.back().fType)); |
506 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers(); | 506 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers(); |
507 if (activeTraceMarkers.count() > 0) { | 507 if (activeTraceMarkers.count() > 0) { |
508 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); | 508 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); |
509 fGpuCmdMarkers.push_back(activeTraceMarkers); | 509 fGpuCmdMarkers.push_back(activeTraceMarkers); |
510 } | 510 } |
511 } | 511 } |
OLD | NEW |