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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst, | 586 bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst, |
587 GrSurface* src, | 587 GrSurface* src, |
588 const SkIRect& srcRect, | 588 const SkIRect& srcRect, |
589 const SkIPoint& dstPoint) { | 589 const SkIPoint& dstPoint) { |
590 if (fDstGpu->canCopySurface(dst, src, srcRect, dstPoint)) { | 590 if (fDstGpu->canCopySurface(dst, src, srcRect, dstPoint)) { |
591 CopySurface* cs = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, CopySurface, (dst
, src)); | 591 CopySurface* cs = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, CopySurface, (dst
, src)); |
592 cs->fSrcRect = srcRect; | 592 cs->fSrcRect = srcRect; |
593 cs->fDstPoint = dstPoint; | 593 cs->fDstPoint = dstPoint; |
594 this->recordTraceMarkersIfNecessary(); | 594 this->recordTraceMarkersIfNecessary(); |
595 return true; | 595 return true; |
| 596 } else if (this->canCopySurface(dst, src, srcRect, dstPoint)) { |
| 597 this->GrDrawTarget::onCopySurface(dst, src, srcRect, dstPoint); |
| 598 return true; |
596 } else { | 599 } else { |
597 return false; | 600 return false; |
598 } | 601 } |
599 } | 602 } |
600 | 603 |
601 bool GrInOrderDrawBuffer::onCanCopySurface(GrSurface* dst, | 604 bool GrInOrderDrawBuffer::onCanCopySurface(GrSurface* dst, |
602 GrSurface* src, | 605 GrSurface* src, |
603 const SkIRect& srcRect, | 606 const SkIRect& srcRect, |
604 const SkIPoint& dstPoint) { | 607 const SkIPoint& dstPoint) { |
605 return fDstGpu->canCopySurface(dst, src, srcRect, dstPoint); | 608 return fDstGpu->canCopySurface(dst, src, srcRect, dstPoint); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); | 860 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); |
858 fGpuCmdMarkers.push_back(activeTraceMarkers); | 861 fGpuCmdMarkers.push_back(activeTraceMarkers); |
859 } | 862 } |
860 } | 863 } |
861 | 864 |
862 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { | 865 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { |
863 INHERITED::clipWillBeSet(newClipData); | 866 INHERITED::clipWillBeSet(newClipData); |
864 fClipSet = true; | 867 fClipSet = true; |
865 fClipProxyState = kUnknown_ClipProxyState; | 868 fClipProxyState = kUnknown_ClipProxyState; |
866 } | 869 } |
OLD | NEW |