| 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 } | 581 } |
| 582 } | 582 } |
| 583 | 583 |
| 584 bool GrInOrderDrawBuffer::onCanCopySurface(GrSurface* dst, | 584 bool GrInOrderDrawBuffer::onCanCopySurface(GrSurface* dst, |
| 585 GrSurface* src, | 585 GrSurface* src, |
| 586 const SkIRect& srcRect, | 586 const SkIRect& srcRect, |
| 587 const SkIPoint& dstPoint) { | 587 const SkIPoint& dstPoint) { |
| 588 return fDstGpu->canCopySurface(dst, src, srcRect, dstPoint); | 588 return fDstGpu->canCopySurface(dst, src, srcRect, dstPoint); |
| 589 } | 589 } |
| 590 | 590 |
| 591 void GrInOrderDrawBuffer::initCopySurfaceDstDesc(const GrSurface* src, GrTexture
Desc* desc) { | 591 void GrInOrderDrawBuffer::initCopySurfaceDstDesc(const GrSurface* src, GrSurface
Desc* desc) { |
| 592 fDstGpu->initCopySurfaceDstDesc(src, desc); | 592 fDstGpu->initCopySurfaceDstDesc(src, desc); |
| 593 } | 593 } |
| 594 | 594 |
| 595 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount, | 595 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount, |
| 596 int indexCount) { | 596 int indexCount) { |
| 597 // We use geometryHints() to know whether to flush the draw buffer. We | 597 // We use geometryHints() to know whether to flush the draw buffer. We |
| 598 // can't flush if we are inside an unbalanced pushGeometrySource. | 598 // can't flush if we are inside an unbalanced pushGeometrySource. |
| 599 // Moreover, flushing blows away vertex and index data that was | 599 // Moreover, flushing blows away vertex and index data that was |
| 600 // previously reserved. So if the vertex or index data is pulled from | 600 // previously reserved. So if the vertex or index data is pulled from |
| 601 // reserved space and won't be released by this request then we can't | 601 // reserved space and won't be released by this request then we can't |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); | 841 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); |
| 842 fGpuCmdMarkers.push_back(activeTraceMarkers); | 842 fGpuCmdMarkers.push_back(activeTraceMarkers); |
| 843 } | 843 } |
| 844 } | 844 } |
| 845 | 845 |
| 846 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { | 846 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { |
| 847 INHERITED::clipWillBeSet(newClipData); | 847 INHERITED::clipWillBeSet(newClipData); |
| 848 fClipSet = true; | 848 fClipSet = true; |
| 849 fClipProxyState = kUnknown_ClipProxyState; | 849 fClipProxyState = kUnknown_ClipProxyState; |
| 850 } | 850 } |
| OLD | NEW |