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

Side by Side Diff: src/animator/SkPaintPart.h

Issue 1933393002: Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Restore deleted Android code. Created 4 years, 7 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 | « src/animator/SkDrawPaint.cpp ('k') | src/core/SkFont.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkPaintPart_DEFINED 8 #ifndef SkPaintPart_DEFINED
9 #define SkPaintPart_DEFINED 9 #define SkPaintPart_DEFINED
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 SkDrawMatrix* matrix; 55 SkDrawMatrix* matrix;
56 int /*SkShader::TileMode*/ tileMode; 56 int /*SkShader::TileMode*/ tileMode;
57 }; 57 };
58 58
59 class SkDrawTypeface : public SkPaintPart { 59 class SkDrawTypeface : public SkPaintPart {
60 DECLARE_DRAW_MEMBER_INFO(Typeface); 60 DECLARE_DRAW_MEMBER_INFO(Typeface);
61 SkDrawTypeface(); 61 SkDrawTypeface();
62 #ifdef SK_DUMP_ENABLED 62 #ifdef SK_DUMP_ENABLED
63 void dump(SkAnimateMaker *) override; 63 void dump(SkAnimateMaker *) override;
64 #endif 64 #endif
65 SkTypeface* getTypeface() { 65 sk_sp<SkTypeface> getTypeface() { return SkTypeface::MakeFromName(fontName.c _str(), style); }
66 return SkTypeface::CreateFromName(fontName.c_str(), style); }
67 protected: 66 protected:
68 bool add() override; 67 bool add() override;
69 SkString fontName; 68 SkString fontName;
70 SkTypeface::Style style; 69 SkTypeface::Style style;
71 }; 70 };
72 71
73 #endif // SkPaintPart_DEFINED 72 #endif // SkPaintPart_DEFINED
OLDNEW
« no previous file with comments | « src/animator/SkDrawPaint.cpp ('k') | src/core/SkFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698