| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "GrInOrderDrawBuffer.h" | 10 #include "GrInOrderDrawBuffer.h" |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 533 } |
| 534 } | 534 } |
| 535 | 535 |
| 536 bool GrInOrderDrawBuffer::onCanCopySurface(GrSurface* dst, | 536 bool GrInOrderDrawBuffer::onCanCopySurface(GrSurface* dst, |
| 537 GrSurface* src, | 537 GrSurface* src, |
| 538 const SkIRect& srcRect, | 538 const SkIRect& srcRect, |
| 539 const SkIPoint& dstPoint) { | 539 const SkIPoint& dstPoint) { |
| 540 return fDstGpu->canCopySurface(dst, src, srcRect, dstPoint); | 540 return fDstGpu->canCopySurface(dst, src, srcRect, dstPoint); |
| 541 } | 541 } |
| 542 | 542 |
| 543 void GrInOrderDrawBuffer::initCopySurfaceDstDesc(const GrSurface* src, GrTexture
Desc* desc) { |
| 544 fDstGpu->initCopySurfaceDstDesc(src, desc); |
| 545 } |
| 546 |
| 543 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace( | 547 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace( |
| 544 int vertexCount, | 548 int vertexCount, |
| 545 int indexCount) { | 549 int indexCount) { |
| 546 // We use geometryHints() to know whether to flush the draw buffer. We | 550 // We use geometryHints() to know whether to flush the draw buffer. We |
| 547 // can't flush if we are inside an unbalanced pushGeometrySource. | 551 // can't flush if we are inside an unbalanced pushGeometrySource. |
| 548 // Moreover, flushing blows away vertex and index data that was | 552 // Moreover, flushing blows away vertex and index data that was |
| 549 // previously reserved. So if the vertex or index data is pulled from | 553 // previously reserved. So if the vertex or index data is pulled from |
| 550 // reserved space and won't be released by this request then we can't | 554 // reserved space and won't be released by this request then we can't |
| 551 // flush. | 555 // flush. |
| 552 bool insideGeoPush = fGeoPoolStateStack.count() > 1; | 556 bool insideGeoPush = fGeoPoolStateStack.count() > 1; |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 fCmds.push_back(kCopySurface_Cmd); | 797 fCmds.push_back(kCopySurface_Cmd); |
| 794 return &fCopySurfaces.push_back(); | 798 return &fCopySurfaces.push_back(); |
| 795 } | 799 } |
| 796 | 800 |
| 797 | 801 |
| 798 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { | 802 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { |
| 799 INHERITED::clipWillBeSet(newClipData); | 803 INHERITED::clipWillBeSet(newClipData); |
| 800 fClipSet = true; | 804 fClipSet = true; |
| 801 fClipProxyState = kUnknown_ClipProxyState; | 805 fClipProxyState = kUnknown_ClipProxyState; |
| 802 } | 806 } |
| OLD | NEW |