| 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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 bool targetHasReservedGeom = fDstGpu->hasReservedVerticesOrIndices(); | 632 bool targetHasReservedGeom = fDstGpu->hasReservedVerticesOrIndices(); |
| 633 | 633 |
| 634 int vcount = vertexCount; | 634 int vcount = vertexCount; |
| 635 int icount = indexCount; | 635 int icount = indexCount; |
| 636 | 636 |
| 637 if (!insideGeoPush && | 637 if (!insideGeoPush && |
| 638 !unreleasedVertexSpace && | 638 !unreleasedVertexSpace && |
| 639 !unreleasedIndexSpace && | 639 !unreleasedIndexSpace && |
| 640 !targetHasReservedGeom && | 640 !targetHasReservedGeom && |
| 641 this->geometryHints(&vcount, &icount)) { | 641 this->geometryHints(&vcount, &icount)) { |
| 642 |
| 642 this->flush(); | 643 this->flush(); |
| 643 } | 644 } |
| 644 } | 645 } |
| 645 | 646 |
| 646 bool GrInOrderDrawBuffer::geometryHints(int* vertexCount, | 647 bool GrInOrderDrawBuffer::geometryHints(int* vertexCount, |
| 647 int* indexCount) const { | 648 int* indexCount) const { |
| 648 // we will recommend a flush if the data could fit in a single | 649 // we will recommend a flush if the data could fit in a single |
| 649 // preallocated buffer but none are left and it can't fit | 650 // preallocated buffer but none are left and it can't fit |
| 650 // in the current buffer (which may not be prealloced). | 651 // in the current buffer (which may not be prealloced). |
| 651 bool flush = false; | 652 bool flush = false; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); | 858 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); |
| 858 fGpuCmdMarkers.push_back(activeTraceMarkers); | 859 fGpuCmdMarkers.push_back(activeTraceMarkers); |
| 859 } | 860 } |
| 860 } | 861 } |
| 861 | 862 |
| 862 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { | 863 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { |
| 863 INHERITED::clipWillBeSet(newClipData); | 864 INHERITED::clipWillBeSet(newClipData); |
| 864 fClipSet = true; | 865 fClipSet = true; |
| 865 fClipProxyState = kUnknown_ClipProxyState; | 866 fClipProxyState = kUnknown_ClipProxyState; |
| 866 } | 867 } |
| OLD | NEW |