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

Side by Side Diff: include/ports/SkTypeface_win.h

Issue 218833005: Pass the IDWriteFactory instead of relying on a global creator. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « gm/fontmgr.cpp ('k') | src/ports/SkFontHost_win_dw.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 2011 Google Inc. 2 * Copyright 2011 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 SkTypeface_win_DEFINED 8 #ifndef SkTypeface_win_DEFINED
9 #define SkTypeface_win_DEFINED 9 #define SkTypeface_win_DEFINED
10 10
(...skipping 19 matching lines...) Expand all
30 * This will get called if Skia tries to access the data but hits a failure. 30 * This will get called if Skia tries to access the data but hits a failure.
31 * Normally this is null, and is only required if the font data needs to be 31 * Normally this is null, and is only required if the font data needs to be
32 * remotely (re)loaded. 32 * remotely (re)loaded.
33 */ 33 */
34 SK_API void SkTypeface_SetEnsureLOGFONTAccessibleProc(void (*)(const LOGFONT&)); 34 SK_API void SkTypeface_SetEnsureLOGFONTAccessibleProc(void (*)(const LOGFONT&));
35 35
36 // Experimental! 36 // Experimental!
37 // 37 //
38 class SkFontMgr; 38 class SkFontMgr;
39 class SkRemotableFontMgr; 39 class SkRemotableFontMgr;
40 struct IDWriteFactory;
40 41
41 SK_API SkFontMgr* SkFontMgr_New_GDI(); 42 SK_API SkFontMgr* SkFontMgr_New_GDI();
42 SK_API SkFontMgr* SkFontMgr_New_DirectWrite(); 43 SK_API SkFontMgr* SkFontMgr_New_DirectWrite(IDWriteFactory* factory = NULL);
43 44
44 /** 45 /**
45 * Creates an SkFontMgr which renders using DirectWrite and obtains its data 46 * Creates an SkFontMgr which renders using DirectWrite and obtains its data
46 * from the SkRemotableFontMgr. 47 * from the SkRemotableFontMgr.
47 * 48 *
48 * If DirectWrite could not be initialized, will return NULL. 49 * If DirectWrite could not be initialized, will return NULL.
49 */ 50 */
50 SK_API SkFontMgr* SkFontMgr_New_DirectWriteRenderer(SkRemotableFontMgr*); 51 SK_API SkFontMgr* SkFontMgr_New_DirectWriteRenderer(SkRemotableFontMgr*);
51 52
52 /** 53 /**
53 * Creates an SkRemotableFontMgr backed by DirectWrite using the default 54 * Creates an SkRemotableFontMgr backed by DirectWrite using the default
54 * system font collection in the current locale. 55 * system font collection in the current locale.
55 * 56 *
56 * If DirectWrite could not be initialized, will return NULL. 57 * If DirectWrite could not be initialized, will return NULL.
57 */ 58 */
58 SK_API SkRemotableFontMgr* SkRemotableFontMgr_New_DirectWrite(); 59 SK_API SkRemotableFontMgr* SkRemotableFontMgr_New_DirectWrite();
59 60
60 #endif 61 #endif
OLDNEW
« no previous file with comments | « gm/fontmgr.cpp ('k') | src/ports/SkFontHost_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698