| 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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 transformedRect.fBottom < SkIntToScalar(canvasSize.fHeight)) { | 692 transformedRect.fBottom < SkIntToScalar(canvasSize.fHeight)) { |
| 693 return false; | 693 return false; |
| 694 } | 694 } |
| 695 } | 695 } |
| 696 | 696 |
| 697 return this->getClipStack()->quickContains(SkRect::MakeXYWH(0, 0, | 697 return this->getClipStack()->quickContains(SkRect::MakeXYWH(0, 0, |
| 698 SkIntToScalar(canvasSize.fWidth), SkIntToScalar(canvasSize.fHeight))); | 698 SkIntToScalar(canvasSize.fWidth), SkIntToScalar(canvasSize.fHeight))); |
| 699 } | 699 } |
| 700 | 700 |
| 701 void SkDeferredCanvas::willSave(SaveFlags flags) { | 701 void SkDeferredCanvas::willSave(SaveFlags flags) { |
| 702 this->drawingCanvas()->save(flags); | 702 this->drawingCanvas()->save( |
| 703 #ifdef SK_SUPPORT_LEGACY_SAVEFLAGS |
| 704 flags |
| 705 #endif |
| 706 ); |
| 703 this->recordedDrawCommand(); | 707 this->recordedDrawCommand(); |
| 704 this->INHERITED::willSave(flags); | 708 this->INHERITED::willSave(flags); |
| 705 } | 709 } |
| 706 | 710 |
| 707 SkCanvas::SaveLayerStrategy SkDeferredCanvas::willSaveLayer(const SkRect* bounds
, | 711 SkCanvas::SaveLayerStrategy SkDeferredCanvas::willSaveLayer(const SkRect* bounds
, |
| 708 const SkPaint* paint
, SaveFlags flags) { | 712 const SkPaint* paint
, SaveFlags flags) { |
| 709 this->drawingCanvas()->saveLayer(bounds, paint, flags); | 713 this->drawingCanvas()->saveLayer(bounds, paint |
| 714 #ifdef SK_SUPPORT_LEGACY_SAVEFLAGS |
| 715 , flags |
| 716 #endif |
| 717 ); |
| 710 this->recordedDrawCommand(); | 718 this->recordedDrawCommand(); |
| 711 this->INHERITED::willSaveLayer(bounds, paint, flags); | 719 this->INHERITED::willSaveLayer(bounds, paint, flags); |
| 712 // No need for a full layer. | 720 // No need for a full layer. |
| 713 return kNoLayer_SaveLayerStrategy; | 721 return kNoLayer_SaveLayerStrategy; |
| 714 } | 722 } |
| 715 | 723 |
| 716 void SkDeferredCanvas::willRestore() { | 724 void SkDeferredCanvas::willRestore() { |
| 717 this->drawingCanvas()->restore(); | 725 this->drawingCanvas()->restore(); |
| 718 this->recordedDrawCommand(); | 726 this->recordedDrawCommand(); |
| 719 this->INHERITED::willRestore(); | 727 this->INHERITED::willRestore(); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { | 967 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { |
| 960 this->drawingCanvas()->setDrawFilter(filter); | 968 this->drawingCanvas()->setDrawFilter(filter); |
| 961 this->INHERITED::setDrawFilter(filter); | 969 this->INHERITED::setDrawFilter(filter); |
| 962 this->recordedDrawCommand(); | 970 this->recordedDrawCommand(); |
| 963 return filter; | 971 return filter; |
| 964 } | 972 } |
| 965 | 973 |
| 966 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { | 974 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { |
| 967 return this->drawingCanvas(); | 975 return this->drawingCanvas(); |
| 968 } | 976 } |
| OLD | NEW |