OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "core/fxge/include/cfx_fontcache.h" | 7 #include "core/fxge/cfx_fontcache.h" |
8 | 8 |
9 #include "core/fxge/include/cfx_facecache.h" | 9 #include "core/fxge/cfx_facecache.h" |
10 #include "core/fxge/include/fx_font.h" | 10 #include "core/fxge/fx_font.h" |
11 #include "core/fxge/include/fx_freetype.h" | 11 #include "core/fxge/fx_freetype.h" |
12 | 12 |
13 CFX_FontCache::CountedFaceCache::CountedFaceCache() {} | 13 CFX_FontCache::CountedFaceCache::CountedFaceCache() {} |
14 | 14 |
15 CFX_FontCache::CountedFaceCache::~CountedFaceCache() {} | 15 CFX_FontCache::CountedFaceCache::~CountedFaceCache() {} |
16 | 16 |
17 CFX_FontCache::CFX_FontCache() {} | 17 CFX_FontCache::CFX_FontCache() {} |
18 | 18 |
19 CFX_FontCache::~CFX_FontCache() { | 19 CFX_FontCache::~CFX_FontCache() { |
20 ASSERT(m_ExtFaceMap.empty()); | 20 ASSERT(m_ExtFaceMap.empty()); |
21 ASSERT(m_FTFaceMap.empty()); | 21 ASSERT(m_FTFaceMap.empty()); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 if (it == map.end()) | 55 if (it == map.end()) |
56 return; | 56 return; |
57 | 57 |
58 CountedFaceCache* counted_face_cache = it->second.get(); | 58 CountedFaceCache* counted_face_cache = it->second.get(); |
59 if (counted_face_cache->m_nCount > 2) { | 59 if (counted_face_cache->m_nCount > 2) { |
60 counted_face_cache->m_nCount--; | 60 counted_face_cache->m_nCount--; |
61 } else { | 61 } else { |
62 map.erase(it); | 62 map.erase(it); |
63 } | 63 } |
64 } | 64 } |
OLD | NEW |