| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/html/canvas/CanvasFontCache.h" | 5 #include "core/html/canvas/CanvasFontCache.h" |
| 6 | 6 |
| 7 #include "core/css/parser/CSSParser.h" | 7 #include "core/css/parser/CSSParser.h" |
| 8 #include "core/css/resolver/StyleResolver.h" | 8 #include "core/css/resolver/StyleResolver.h" |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "core/style/ComputedStyle.h" | 10 #include "core/style/ComputedStyle.h" |
| 11 #include "platform/fonts/FontCache.h" | 11 #include "platform/fonts/FontCache.h" |
| 12 #include "platform/wtf/PtrUtil.h" |
| 12 #include "public/platform/Platform.h" | 13 #include "public/platform/Platform.h" |
| 13 #include "wtf/PtrUtil.h" | |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 const unsigned CanvasFontCacheMaxFonts = 50; | 17 const unsigned CanvasFontCacheMaxFonts = 50; |
| 18 const unsigned CanvasFontCacheHardMaxFonts = 250; | 18 const unsigned CanvasFontCacheHardMaxFonts = 250; |
| 19 const unsigned CanvasFontCacheHiddenMaxFonts = 1; | 19 const unsigned CanvasFontCacheHiddenMaxFonts = 1; |
| 20 const int defaultFontSize = 10; | 20 const int defaultFontSize = 10; |
| 21 const char defaultFontFamily[] = "sans-serif"; | 21 const char defaultFontFamily[] = "sans-serif"; |
| 22 } | 22 } |
| 23 | 23 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 font_lru_list_.Clear(); | 148 font_lru_list_.Clear(); |
| 149 fonts_resolved_using_default_style_.Clear(); | 149 fonts_resolved_using_default_style_.Clear(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 DEFINE_TRACE(CanvasFontCache) { | 152 DEFINE_TRACE(CanvasFontCache) { |
| 153 visitor->Trace(fetched_fonts_); | 153 visitor->Trace(fetched_fonts_); |
| 154 visitor->Trace(document_); | 154 visitor->Trace(document_); |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace blink | 157 } // namespace blink |
| OLD | NEW |