OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 SkRemotableFontMgr_DEFINED | 8 #ifndef SkRemotableFontMgr_DEFINED |
9 #define SkRemotableFontMgr_DEFINED | 9 #define SkRemotableFontMgr_DEFINED |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 // antialias, embedded bitmaps, autohint, hinting, hintstyle, lcd rendering | 28 // antialias, embedded bitmaps, autohint, hinting, hintstyle, lcd rendering |
29 // may all be set or set to no-preference | 29 // may all be set or set to no-preference |
30 // (No-preference is resolved against globals set by the platform) | 30 // (No-preference is resolved against globals set by the platform) |
31 // Since they may be selected against, these are really 'extensions' to SkFo
ntStyle. | 31 // Since they may be selected against, these are really 'extensions' to SkFo
ntStyle. |
32 // SkFontStyle should pick these up. | 32 // SkFontStyle should pick these up. |
33 SkFontStyle fFontStyle; | 33 SkFontStyle fFontStyle; |
34 }; | 34 }; |
35 | 35 |
36 class SK_API SkRemotableFontIdentitySet : public SkRefCnt { | 36 class SK_API SkRemotableFontIdentitySet : public SkRefCnt { |
37 public: | 37 public: |
38 SK_DECLARE_INST_COUNT(SkRemotableFontIdentitySet) | 38 |
39 | 39 |
40 SkRemotableFontIdentitySet(int count, SkFontIdentity** data); | 40 SkRemotableFontIdentitySet(int count, SkFontIdentity** data); |
41 | 41 |
42 int count() const { return fCount; } | 42 int count() const { return fCount; } |
43 const SkFontIdentity& at(int index) const { return fData[index]; } | 43 const SkFontIdentity& at(int index) const { return fData[index]; } |
44 | 44 |
45 static SkRemotableFontIdentitySet* NewEmpty(); | 45 static SkRemotableFontIdentitySet* NewEmpty(); |
46 | 46 |
47 private: | 47 private: |
48 SkRemotableFontIdentitySet() : fCount(0), fData() { } | 48 SkRemotableFontIdentitySet() : fCount(0), fData() { } |
49 | 49 |
50 friend SkRemotableFontIdentitySet* sk_remotable_font_identity_set_new(); | 50 friend SkRemotableFontIdentitySet* sk_remotable_font_identity_set_new(); |
51 | 51 |
52 int fCount; | 52 int fCount; |
53 SkAutoTMalloc<SkFontIdentity> fData; | 53 SkAutoTMalloc<SkFontIdentity> fData; |
54 | 54 |
55 typedef SkRefCnt INHERITED; | 55 typedef SkRefCnt INHERITED; |
56 }; | 56 }; |
57 | 57 |
58 class SK_API SkRemotableFontMgr : public SkRefCnt { | 58 class SK_API SkRemotableFontMgr : public SkRefCnt { |
59 public: | 59 public: |
60 SK_DECLARE_INST_COUNT(SkRemotableFontMgr) | 60 |
61 | 61 |
62 /** | 62 /** |
63 * Returns the names of the known fonts on the system. | 63 * Returns the names of the known fonts on the system. |
64 * Will not return NULL, will return an empty table if no families exist. | 64 * Will not return NULL, will return an empty table if no families exist. |
65 * | 65 * |
66 * The indexes may be used with getIndex(int) and | 66 * The indexes may be used with getIndex(int) and |
67 * matchIndexStyle(int, SkFontStyle). | 67 * matchIndexStyle(int, SkFontStyle). |
68 * | 68 * |
69 * The caller must unref() the returned object. | 69 * The caller must unref() the returned object. |
70 */ | 70 */ |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 * | 145 * |
146 * The caller must unref() the returned object. | 146 * The caller must unref() the returned object. |
147 */ | 147 */ |
148 virtual SkStreamAsset* getData(int dataId) const = 0; | 148 virtual SkStreamAsset* getData(int dataId) const = 0; |
149 | 149 |
150 private: | 150 private: |
151 typedef SkRefCnt INHERITED; | 151 typedef SkRefCnt INHERITED; |
152 }; | 152 }; |
153 | 153 |
154 #endif | 154 #endif |
OLD | NEW |