OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef SKDRAWCOMMAND_H_ | 8 #ifndef SKDRAWCOMMAND_H_ |
9 #define SKDRAWCOMMAND_H_ | 9 #define SKDRAWCOMMAND_H_ |
10 | 10 |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 char* fText; | 618 char* fText; |
619 size_t fByteLength; | 619 size_t fByteLength; |
620 SkScalar fConstY; | 620 SkScalar fConstY; |
621 SkPaint fPaint; | 621 SkPaint fPaint; |
622 | 622 |
623 typedef SkDrawCommand INHERITED; | 623 typedef SkDrawCommand INHERITED; |
624 }; | 624 }; |
625 | 625 |
626 class SkDrawTextBlobCommand : public SkDrawCommand { | 626 class SkDrawTextBlobCommand : public SkDrawCommand { |
627 public: | 627 public: |
628 SkDrawTextBlobCommand(const SkTextBlob* blob, SkScalar x, SkScalar y, const
SkPaint& paint); | 628 SkDrawTextBlobCommand(sk_sp<SkTextBlob> blob, SkScalar x, SkScalar y, const
SkPaint& paint); |
629 | 629 |
630 void execute(SkCanvas* canvas) const override; | 630 void execute(SkCanvas* canvas) const override; |
631 bool render(SkCanvas* canvas) const override; | 631 bool render(SkCanvas* canvas) const override; |
632 Json::Value toJSON(UrlDataManager& urlDataManager) const override; | 632 Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
633 static SkDrawTextBlobCommand* fromJSON(Json::Value& command, UrlDataManager&
urlDataManager); | 633 static SkDrawTextBlobCommand* fromJSON(Json::Value& command, UrlDataManager&
urlDataManager); |
634 | 634 |
635 private: | 635 private: |
636 SkAutoTUnref<const SkTextBlob> fBlob; | 636 sk_sp<SkTextBlob> fBlob; |
637 SkScalar fXPos; | 637 SkScalar fXPos; |
638 SkScalar fYPos; | 638 SkScalar fYPos; |
639 SkPaint fPaint; | 639 SkPaint fPaint; |
640 | 640 |
641 typedef SkDrawCommand INHERITED; | 641 typedef SkDrawCommand INHERITED; |
642 }; | 642 }; |
643 | 643 |
644 class SkDrawPatchCommand : public SkDrawCommand { | 644 class SkDrawPatchCommand : public SkDrawCommand { |
645 public: | 645 public: |
646 SkDrawPatchCommand(const SkPoint cubics[12], const SkColor colors[4], | 646 SkDrawPatchCommand(const SkPoint cubics[12], const SkColor colors[4], |
647 const SkPoint texCoords[4], SkXfermode* xmode, | 647 const SkPoint texCoords[4], SkXfermode* xmode, |
648 const SkPaint& paint); | 648 const SkPaint& paint); |
649 void execute(SkCanvas* canvas) const override; | 649 void execute(SkCanvas* canvas) const override; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 Json::Value toJSON(UrlDataManager& urlDataManager) const override; | 794 Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
795 static SkTranslateZCommand* fromJSON(Json::Value& command, UrlDataManager& u
rlDataManager); | 795 static SkTranslateZCommand* fromJSON(Json::Value& command, UrlDataManager& u
rlDataManager); |
796 | 796 |
797 private: | 797 private: |
798 SkScalar fZTranslate; | 798 SkScalar fZTranslate; |
799 | 799 |
800 typedef SkDrawCommand INHERITED; | 800 typedef SkDrawCommand INHERITED; |
801 }; | 801 }; |
802 #endif | 802 #endif |
803 | 803 |
OLD | NEW |