| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |