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

Side by Side Diff: src/ports/SkFontConfigInterface_direct.h

Issue 2211143002: Move to SkDataTable::MakeXXX and sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use bare pointer for global. Created 4 years, 4 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/fonts/SkFontMgr_indirect.cpp ('k') | src/ports/SkFontConfigInterface_direct.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 2009-2015 Google Inc. 2 * Copyright 2009-2015 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 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */ 8 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */
9 9
10 #include "SkFontConfigInterface.h" 10 #include "SkFontConfigInterface.h"
11 11
12 #include <fontconfig/fontconfig.h> 12 #include <fontconfig/fontconfig.h>
13 13
14 class SkFontConfigInterfaceDirect : public SkFontConfigInterface { 14 class SkFontConfigInterfaceDirect : public SkFontConfigInterface {
15 public: 15 public:
16 SkFontConfigInterfaceDirect(); 16 SkFontConfigInterfaceDirect();
17 ~SkFontConfigInterfaceDirect() override; 17 ~SkFontConfigInterfaceDirect() override;
18 18
19 bool matchFamilyName(const char familyName[], 19 bool matchFamilyName(const char familyName[],
20 SkFontStyle requested, 20 SkFontStyle requested,
21 FontIdentity* outFontIdentifier, 21 FontIdentity* outFontIdentifier,
22 SkString* outFamilyName, 22 SkString* outFamilyName,
23 SkFontStyle* outStyle) override; 23 SkFontStyle* outStyle) override;
24 24
25 SkStreamAsset* openStream(const FontIdentity&) override; 25 SkStreamAsset* openStream(const FontIdentity&) override;
26 26
27 // new APIs 27 // new APIs
28 SkDataTable* getFamilyNames() override; 28 sk_sp<SkDataTable> getFamilyNames() override;
29 29
30 protected: 30 protected:
31 virtual bool isAccessible(const char* filename); 31 virtual bool isAccessible(const char* filename);
32 32
33 private: 33 private:
34 bool isValidPattern(FcPattern* pattern); 34 bool isValidPattern(FcPattern* pattern);
35 FcPattern* MatchFont(FcFontSet* font_set, const char* post_config_family, 35 FcPattern* MatchFont(FcFontSet* font_set, const char* post_config_family,
36 const SkString& family); 36 const SkString& family);
37 typedef SkFontConfigInterface INHERITED; 37 typedef SkFontConfigInterface INHERITED;
38 }; 38 };
OLDNEW
« no previous file with comments | « src/fonts/SkFontMgr_indirect.cpp ('k') | src/ports/SkFontConfigInterface_direct.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698