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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 | 568 |
569 void GrInOrderDrawBuffer::CopySurface::execute(GrInOrderDrawBuffer* buf, const S
etState*) { | 569 void GrInOrderDrawBuffer::CopySurface::execute(GrInOrderDrawBuffer* buf, const S
etState*) { |
570 buf->getGpu()->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint); | 570 buf->getGpu()->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint); |
571 } | 571 } |
572 | 572 |
573 bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst, | 573 bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst, |
574 GrSurface* src, | 574 GrSurface* src, |
575 const SkIRect& srcRect, | 575 const SkIRect& srcRect, |
576 const SkIPoint& dstPoint) { | 576 const SkIPoint& dstPoint) { |
577 if (getGpu()->canCopySurface(dst, src, srcRect, dstPoint)) { | 577 if (getGpu()->canCopySurface(dst, src, srcRect, dstPoint)) { |
| 578 this->closeBatch(); |
578 CopySurface* cs = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, CopySurface, (dst
, src)); | 579 CopySurface* cs = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, CopySurface, (dst
, src)); |
579 cs->fSrcRect = srcRect; | 580 cs->fSrcRect = srcRect; |
580 cs->fDstPoint = dstPoint; | 581 cs->fDstPoint = dstPoint; |
581 this->recordTraceMarkersIfNecessary(); | 582 this->recordTraceMarkersIfNecessary(); |
582 return true; | 583 return true; |
583 } | 584 } |
584 return false; | 585 return false; |
585 } | 586 } |
586 | 587 |
587 bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrPipelineBuilder& pipe
lineBuilder, | 588 bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrPipelineBuilder& pipe
lineBuilder, |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 int vcount = vertexCount; | 683 int vcount = vertexCount; |
683 int icount = indexCount; | 684 int icount = indexCount; |
684 | 685 |
685 if (!insideGeoPush && | 686 if (!insideGeoPush && |
686 !unreleasedVertexSpace && | 687 !unreleasedVertexSpace && |
687 !unreleasedIndexSpace && | 688 !unreleasedIndexSpace && |
688 this->geometryHints(vertexStride, &vcount, &icount)) { | 689 this->geometryHints(vertexStride, &vcount, &icount)) { |
689 this->flush(); | 690 this->flush(); |
690 } | 691 } |
691 } | 692 } |
OLD | NEW |