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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 fStates[currState].restoreTo(&playbackState); | 638 fStates[currState].restoreTo(&playbackState); |
639 ++currState; | 639 ++currState; |
640 break; | 640 break; |
641 case kSetClip_Cmd: | 641 case kSetClip_Cmd: |
642 clipData.fClipStack = &fClips[currClip]; | 642 clipData.fClipStack = &fClips[currClip]; |
643 clipData.fOrigin = fClipOrigins[currClip]; | 643 clipData.fOrigin = fClipOrigins[currClip]; |
644 fDstGpu->setClip(&clipData); | 644 fDstGpu->setClip(&clipData); |
645 ++currClip; | 645 ++currClip; |
646 break; | 646 break; |
647 case kClear_Cmd: | 647 case kClear_Cmd: |
648 if (GrColor_ILLEGAL == fClears[currClear].fColor) { | 648 if (false && GrColor_ILLEGAL == fClears[currClear].fColor) { |
649 fDstGpu->discard(fClears[currClear].fRenderTarget); | 649 fDstGpu->discard(fClears[currClear].fRenderTarget); |
650 } else { | 650 } else { |
651 fDstGpu->clear(&fClears[currClear].fRect, | 651 fDstGpu->clear(&fClears[currClear].fRect, |
652 fClears[currClear].fColor, | 652 fClears[currClear].fColor, |
653 fClears[currClear].fCanIgnoreRect, | 653 fClears[currClear].fCanIgnoreRect, |
654 fClears[currClear].fRenderTarget); | 654 fClears[currClear].fRenderTarget); |
655 } | 655 } |
656 ++currClear; | 656 ++currClear; |
657 break; | 657 break; |
658 case kCopySurface_Cmd: | 658 case kCopySurface_Cmd: |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 this->addToCmdBuffer(kCopySurface_Cmd); | 982 this->addToCmdBuffer(kCopySurface_Cmd); |
983 return &fCopySurfaces.push_back(); | 983 return &fCopySurfaces.push_back(); |
984 } | 984 } |
985 | 985 |
986 | 986 |
987 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { | 987 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { |
988 INHERITED::clipWillBeSet(newClipData); | 988 INHERITED::clipWillBeSet(newClipData); |
989 fClipSet = true; | 989 fClipSet = true; |
990 fClipProxyState = kUnknown_ClipProxyState; | 990 fClipProxyState = kUnknown_ClipProxyState; |
991 } | 991 } |
OLD | NEW |