| 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 28 matching lines...) Expand all Loading... |
| 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 static SkRemotableFontIdentitySet* NewEmptyImpl(); | 49 |
| 50 friend SkRemotableFontIdentitySet* sk_remotable_font_identity_set_new(); |
| 50 | 51 |
| 51 int fCount; | 52 int fCount; |
| 52 SkAutoTMalloc<SkFontIdentity> fData; | 53 SkAutoTMalloc<SkFontIdentity> fData; |
| 53 | 54 |
| 54 typedef SkRefCnt INHERITED; | 55 typedef SkRefCnt INHERITED; |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 class SK_API SkRemotableFontMgr : public SkRefCnt { | 58 class SK_API SkRemotableFontMgr : public SkRefCnt { |
| 58 public: | 59 public: |
| 59 SK_DECLARE_INST_COUNT(SkRemotableFontMgr) | 60 SK_DECLARE_INST_COUNT(SkRemotableFontMgr) |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 * | 144 * |
| 144 * The caller must unref() the returned object. | 145 * The caller must unref() the returned object. |
| 145 */ | 146 */ |
| 146 virtual SkStreamAsset* getData(int dataId) const = 0; | 147 virtual SkStreamAsset* getData(int dataId) const = 0; |
| 147 | 148 |
| 148 private: | 149 private: |
| 149 typedef SkRefCnt INHERITED; | 150 typedef SkRefCnt INHERITED; |
| 150 }; | 151 }; |
| 151 | 152 |
| 152 #endif | 153 #endif |
| OLD | NEW |