| 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 #include "SkDataTable.h" |
| 9 #include "SkFontMgr.h" |
| 8 #include "SkFontMgr_indirect.h" | 10 #include "SkFontMgr_indirect.h" |
| 9 | |
| 10 #include "SkDataTable.h" | |
| 11 #include "SkFontStyle.h" | 11 #include "SkFontStyle.h" |
| 12 #include "SkMutex.h" |
| 12 #include "SkOnce.h" | 13 #include "SkOnce.h" |
| 14 #include "SkRefCnt.h" |
| 15 #include "SkRemotableFontMgr.h" |
| 13 #include "SkStream.h" | 16 #include "SkStream.h" |
| 14 #include "SkTSearch.h" | 17 #include "SkString.h" |
| 18 #include "SkTArray.h" |
| 15 #include "SkTypeface.h" | 19 #include "SkTypeface.h" |
| 20 #include "SkTypes.h" |
| 21 #include "SkTemplates.h" |
| 16 | 22 |
| 17 class SkData; | 23 class SkData; |
| 18 class SkString; | |
| 19 | 24 |
| 20 class SkStyleSet_Indirect : public SkFontStyleSet { | 25 class SkStyleSet_Indirect : public SkFontStyleSet { |
| 21 public: | 26 public: |
| 22 /** Takes ownership of the SkRemotableFontIdentitySet. */ | 27 /** Takes ownership of the SkRemotableFontIdentitySet. */ |
| 23 SkStyleSet_Indirect(const SkFontMgr_Indirect* owner, int familyIndex, | 28 SkStyleSet_Indirect(const SkFontMgr_Indirect* owner, int familyIndex, |
| 24 SkRemotableFontIdentitySet* data) | 29 SkRemotableFontIdentitySet* data) |
| 25 : fOwner(SkRef(owner)), fFamilyIndex(familyIndex), fData(data) | 30 : fOwner(SkRef(owner)), fFamilyIndex(familyIndex), fData(data) |
| 26 { } | 31 { } |
| 27 | 32 |
| 28 int count() override { return fData->count(); } | 33 int count() override { return fData->count(); } |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 face.reset(this->matchFamilyStyle(NULL, style)); | 295 face.reset(this->matchFamilyStyle(NULL, style)); |
| 291 } | 296 } |
| 292 | 297 |
| 293 if (NULL == face.get()) { | 298 if (NULL == face.get()) { |
| 294 SkFontIdentity fontId = this->fProxy->matchIndexStyle(0, style); | 299 SkFontIdentity fontId = this->fProxy->matchIndexStyle(0, style); |
| 295 face.reset(this->createTypefaceFromFontId(fontId)); | 300 face.reset(this->createTypefaceFromFontId(fontId)); |
| 296 } | 301 } |
| 297 | 302 |
| 298 return face.detach(); | 303 return face.detach(); |
| 299 } | 304 } |
| OLD | NEW |