OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 #ifndef SKDRAWCOMMAND_H_ | 9 #ifndef SKDRAWCOMMAND_H_ |
10 #define SKDRAWCOMMAND_H_ | 10 #define SKDRAWCOMMAND_H_ |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 public: | 544 public: |
545 SkSaveCommand(); | 545 SkSaveCommand(); |
546 void execute(SkCanvas* canvas) const override; | 546 void execute(SkCanvas* canvas) const override; |
547 Action action() const override { return kPushLayer_Action; } | 547 Action action() const override { return kPushLayer_Action; } |
548 private: | 548 private: |
549 typedef SkDrawCommand INHERITED; | 549 typedef SkDrawCommand INHERITED; |
550 }; | 550 }; |
551 | 551 |
552 class SkSaveLayerCommand : public SkDrawCommand { | 552 class SkSaveLayerCommand : public SkDrawCommand { |
553 public: | 553 public: |
554 SkSaveLayerCommand(const SkRect* bounds, const SkPaint* paint, | 554 SkSaveLayerCommand(const SkCanvas::SaveLayerRec&); |
555 SkCanvas::SaveFlags flags); | |
556 void execute(SkCanvas* canvas) const override; | 555 void execute(SkCanvas* canvas) const override; |
557 void vizExecute(SkCanvas* canvas) const override; | 556 void vizExecute(SkCanvas* canvas) const override; |
558 Action action() const override{ return kPushLayer_Action; } | 557 Action action() const override{ return kPushLayer_Action; } |
559 void setActive(bool active) override { fActive = active; } | 558 void setActive(bool active) override { fActive = active; } |
560 bool active() const override { return fActive; } | 559 bool active() const override { return fActive; } |
561 | 560 |
562 const SkPaint* paint() const { return fPaintPtr; } | 561 const SkPaint* paint() const { return fPaintPtr; } |
563 | 562 |
564 private: | 563 private: |
565 SkRect fBounds; | 564 SkRect fBounds; |
566 SkPaint fPaint; | 565 SkPaint fPaint; |
567 SkPaint* fPaintPtr; | 566 SkPaint* fPaintPtr; |
568 SkCanvas::SaveFlags fFlags; | 567 uint32_t fSaveLayerFlags; |
569 | 568 |
570 bool fActive; | 569 bool fActive; |
571 | 570 |
572 typedef SkDrawCommand INHERITED; | 571 typedef SkDrawCommand INHERITED; |
573 }; | 572 }; |
574 | 573 |
575 class SkSetMatrixCommand : public SkDrawCommand { | 574 class SkSetMatrixCommand : public SkDrawCommand { |
576 public: | 575 public: |
577 SkSetMatrixCommand(const SkMatrix& matrix); | 576 SkSetMatrixCommand(const SkMatrix& matrix); |
578 void setUserMatrix(const SkMatrix&) override; | 577 void setUserMatrix(const SkMatrix&) override; |
579 void execute(SkCanvas* canvas) const override; | 578 void execute(SkCanvas* canvas) const override; |
580 private: | 579 private: |
581 SkMatrix fUserMatrix; | 580 SkMatrix fUserMatrix; |
582 SkMatrix fMatrix; | 581 SkMatrix fMatrix; |
583 | 582 |
584 typedef SkDrawCommand INHERITED; | 583 typedef SkDrawCommand INHERITED; |
585 }; | 584 }; |
586 | 585 |
587 #endif | 586 #endif |
OLD | NEW |