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

Side by Side Diff: core/fxge/ge/cfx_fontcache.cpp

Issue 2263623002: Refactor fx_font part 3 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Comments Created 4 years, 4 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
« no previous file with comments | « core/fxge/ge/cfx_facecache.cpp ('k') | core/fxge/ge/cfx_renderdevice.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 // 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/include/cfx_fontcache.h"
8 8
9 #include "core/fxge/include/cfx_facecache.h"
9 #include "core/fxge/include/fx_font.h" 10 #include "core/fxge/include/fx_font.h"
10 #include "core/fxge/include/fx_freetype.h" 11 #include "core/fxge/include/fx_freetype.h"
11 12
12 CFX_FontCache::CFX_FontCache() {} 13 CFX_FontCache::CFX_FontCache() {}
13 14
14 CFX_FontCache::~CFX_FontCache() { 15 CFX_FontCache::~CFX_FontCache() {
15 FreeCache(TRUE); 16 FreeCache(TRUE);
16 } 17 }
17 18
18 CFX_FaceCache* CFX_FontCache::GetCachedFace(CFX_Font* pFont) { 19 CFX_FaceCache* CFX_FontCache::GetCachedFace(CFX_Font* pFont) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 for (auto it = m_ExtFaceMap.begin(); it != m_ExtFaceMap.end();) { 70 for (auto it = m_ExtFaceMap.begin(); it != m_ExtFaceMap.end();) {
70 auto curr_it = it++; 71 auto curr_it = it++;
71 CFX_CountedFaceCache* cache = curr_it->second; 72 CFX_CountedFaceCache* cache = curr_it->second;
72 if (bRelease || cache->m_nCount < 2) { 73 if (bRelease || cache->m_nCount < 2) {
73 delete cache->m_Obj; 74 delete cache->m_Obj;
74 delete cache; 75 delete cache;
75 m_ExtFaceMap.erase(curr_it); 76 m_ExtFaceMap.erase(curr_it);
76 } 77 }
77 } 78 }
78 } 79 }
OLDNEW
« no previous file with comments | « core/fxge/ge/cfx_facecache.cpp ('k') | core/fxge/ge/cfx_renderdevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698