| 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 GrSurface* src, | 560 GrSurface* src, |
| 561 const SkIRect& srcRect, | 561 const SkIRect& srcRect, |
| 562 const SkIPoint& dstPoint) { | 562 const SkIPoint& dstPoint) { |
| 563 return fDstGpu->canCopySurface(dst, src, srcRect, dstPoint); | 563 return fDstGpu->canCopySurface(dst, src, srcRect, dstPoint); |
| 564 } | 564 } |
| 565 | 565 |
| 566 void GrInOrderDrawBuffer::initCopySurfaceDstDesc(const GrSurface* src, GrTexture
Desc* desc) { | 566 void GrInOrderDrawBuffer::initCopySurfaceDstDesc(const GrSurface* src, GrTexture
Desc* desc) { |
| 567 fDstGpu->initCopySurfaceDstDesc(src, desc); | 567 fDstGpu->initCopySurfaceDstDesc(src, desc); |
| 568 } | 568 } |
| 569 | 569 |
| 570 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace( | 570 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount, |
| 571 int vertexCount, | 571 int indexCount) { |
| 572 int indexCount) { | |
| 573 // We use geometryHints() to know whether to flush the draw buffer. We | 572 // We use geometryHints() to know whether to flush the draw buffer. We |
| 574 // can't flush if we are inside an unbalanced pushGeometrySource. | 573 // can't flush if we are inside an unbalanced pushGeometrySource. |
| 575 // Moreover, flushing blows away vertex and index data that was | 574 // Moreover, flushing blows away vertex and index data that was |
| 576 // previously reserved. So if the vertex or index data is pulled from | 575 // previously reserved. So if the vertex or index data is pulled from |
| 577 // reserved space and won't be released by this request then we can't | 576 // reserved space and won't be released by this request then we can't |
| 578 // flush. | 577 // flush. |
| 579 bool insideGeoPush = fGeoPoolStateStack.count() > 1; | 578 bool insideGeoPush = fGeoPoolStateStack.count() > 1; |
| 580 | 579 |
| 581 bool unreleasedVertexSpace = | 580 bool unreleasedVertexSpace = |
| 582 !vertexCount && | 581 !vertexCount && |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 fCmds.push_back(kCopySurface_Cmd); | 819 fCmds.push_back(kCopySurface_Cmd); |
| 821 return &fCopySurfaces.push_back(); | 820 return &fCopySurfaces.push_back(); |
| 822 } | 821 } |
| 823 | 822 |
| 824 | 823 |
| 825 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { | 824 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { |
| 826 INHERITED::clipWillBeSet(newClipData); | 825 INHERITED::clipWillBeSet(newClipData); |
| 827 fClipSet = true; | 826 fClipSet = true; |
| 828 fClipProxyState = kUnknown_ClipProxyState; | 827 fClipProxyState = kUnknown_ClipProxyState; |
| 829 } | 828 } |
| OLD | NEW |