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

Side by Side Diff: Source/platform/fonts/win/FontCacheSkiaWin.cpp

Issue 213223003: Add ability to pass through IDWriteFactory so sandbox can control how it's constructed (Closed) Base URL: svn://svn.chromium.org/blink/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 | « Source/platform/fonts/FontCache.cpp ('k') | Source/web/win/WebFontRendering.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 (C) 2006, 2007 Apple Computer, Inc. 2 * Copyright (C) 2006, 2007 Apple Computer, Inc.
3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Minimum size, in pixels, at which anti alias is enabled for certain 45 // Minimum size, in pixels, at which anti alias is enabled for certain
46 // scripts. Only applies to the Direct Write backend for now. 46 // scripts. Only applies to the Direct Write backend for now.
47 static const unsigned s_minSizeForComplexScriptsAntiAlias = 32; 47 static const unsigned s_minSizeForComplexScriptsAntiAlias = 32;
48 48
49 FontCache::FontCache() 49 FontCache::FontCache()
50 : m_purgePreventCount(0) 50 : m_purgePreventCount(0)
51 { 51 {
52 SkFontMgr* fontManager; 52 SkFontMgr* fontManager;
53 53
54 if (s_useDirectWrite) { 54 if (s_useDirectWrite) {
55 fontManager = SkFontMgr_New_DirectWrite(); 55 fontManager = SkFontMgr_New_DirectWrite(s_directWriteFactory);
56 } else { 56 } else {
57 fontManager = SkFontMgr_New_GDI(); 57 fontManager = SkFontMgr_New_GDI();
58 // Subpixel text positioning is not supported by the GDI backend. 58 // Subpixel text positioning is not supported by the GDI backend.
59 s_useSubpixelPositioning = false; 59 s_useSubpixelPositioning = false;
60 } 60 }
61 61
62 ASSERT(fontManager); 62 ASSERT(fontManager);
63 m_fontManager = adoptPtr(fontManager); 63 m_fontManager = adoptPtr(fontManager);
64 } 64 }
65 65
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 || fontDescription.script() == USCRIPT_CANADIAN_ABORIGINAL 239 || fontDescription.script() == USCRIPT_CANADIAN_ABORIGINAL
240 || fontDescription.script() == USCRIPT_CHEROKEE 240 || fontDescription.script() == USCRIPT_CHEROKEE
241 || fontDescription.script() == USCRIPT_MONGOLIAN)) { 241 || fontDescription.script() == USCRIPT_MONGOLIAN)) {
242 result->setMinSizeForAntiAlias(s_minSizeForComplexScriptsAntiAlias); 242 result->setMinSizeForAntiAlias(s_minSizeForComplexScriptsAntiAlias);
243 } 243 }
244 244
245 return result; 245 return result;
246 } 246 }
247 247
248 } 248 }
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontCache.cpp ('k') | Source/web/win/WebFontRendering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698