OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 #include "SkDeferredCanvas.h" | 9 #include "SkDeferredCanvas.h" |
10 | 10 |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 transformedRect.fRight < SkIntToScalar(canvasSize.fWidth) || | 671 transformedRect.fRight < SkIntToScalar(canvasSize.fWidth) || |
672 transformedRect.fBottom < SkIntToScalar(canvasSize.fHeight)) { | 672 transformedRect.fBottom < SkIntToScalar(canvasSize.fHeight)) { |
673 return false; | 673 return false; |
674 } | 674 } |
675 } | 675 } |
676 | 676 |
677 return this->getClipStack()->quickContains(SkRect::MakeXYWH(0, 0, | 677 return this->getClipStack()->quickContains(SkRect::MakeXYWH(0, 0, |
678 SkIntToScalar(canvasSize.fWidth), SkIntToScalar(canvasSize.fHeight))); | 678 SkIntToScalar(canvasSize.fWidth), SkIntToScalar(canvasSize.fHeight))); |
679 } | 679 } |
680 | 680 |
681 void SkDeferredCanvas::willSave(SaveFlags flags) { | 681 void SkDeferredCanvas::willSave() { |
682 this->drawingCanvas()->save(flags); | 682 this->drawingCanvas()->save(); |
683 this->recordedDrawCommand(); | 683 this->recordedDrawCommand(); |
684 this->INHERITED::willSave(flags); | 684 this->INHERITED::willSave(); |
685 } | 685 } |
686 | 686 |
687 SkCanvas::SaveLayerStrategy SkDeferredCanvas::willSaveLayer(const SkRect* bounds
, | 687 SkCanvas::SaveLayerStrategy SkDeferredCanvas::willSaveLayer(const SkRect* bounds
, |
688 const SkPaint* paint
, SaveFlags flags) { | 688 const SkPaint* paint
, SaveFlags flags) { |
689 this->drawingCanvas()->saveLayer(bounds, paint, flags); | 689 this->drawingCanvas()->saveLayer(bounds, paint, flags); |
690 this->recordedDrawCommand(); | 690 this->recordedDrawCommand(); |
691 this->INHERITED::willSaveLayer(bounds, paint, flags); | 691 this->INHERITED::willSaveLayer(bounds, paint, flags); |
692 // No need for a full layer. | 692 // No need for a full layer. |
693 return kNoLayer_SaveLayerStrategy; | 693 return kNoLayer_SaveLayerStrategy; |
694 } | 694 } |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { | 932 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { |
933 this->drawingCanvas()->setDrawFilter(filter); | 933 this->drawingCanvas()->setDrawFilter(filter); |
934 this->INHERITED::setDrawFilter(filter); | 934 this->INHERITED::setDrawFilter(filter); |
935 this->recordedDrawCommand(); | 935 this->recordedDrawCommand(); |
936 return filter; | 936 return filter; |
937 } | 937 } |
938 | 938 |
939 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { | 939 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { |
940 return this->drawingCanvas(); | 940 return this->drawingCanvas(); |
941 } | 941 } |
OLD | NEW |