Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: tools/debugger/SkDrawCommand.h

Issue 2335493005: Use sk_sp text blob APIs (Closed)
Patch Set: SK_SUPPORT_LEGACY_TEXTBLOB_BUILDER Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/debugger/SkDebugCanvas.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « tools/debugger/SkDebugCanvas.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698