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