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

Side by Side Diff: core/src/fpdfapi/fpdf_font/fpdf_font.cpp

Issue 1700183002: Remove CFX_PtrList from renderer main loop. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits. Created 4 years, 10 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
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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/src/fpdfapi/fpdf_font/font_int.h" 7 #include "core/src/fpdfapi/fpdf_font/font_int.h"
8 8
9 #include "core/src/fpdfapi/fpdf_page/pageint.h" 9 #include "core/src/fpdfapi/fpdf_page/pageint.h"
10 #include "core/include/fpdfapi/fpdf_module.h" 10 #include "core/include/fpdfapi/fpdf_module.h"
(...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 1699
1700 char_rect.Transform(&m_FontMatrix); 1700 char_rect.Transform(&m_FontMatrix);
1701 rcBBox.left = FXSYS_round(char_rect.left * 1000); 1701 rcBBox.left = FXSYS_round(char_rect.left * 1000);
1702 rcBBox.right = FXSYS_round(char_rect.right * 1000); 1702 rcBBox.right = FXSYS_round(char_rect.right * 1000);
1703 rcBBox.top = FXSYS_round(char_rect.top * 1000); 1703 rcBBox.top = FXSYS_round(char_rect.top * 1000);
1704 rcBBox.bottom = FXSYS_round(char_rect.bottom * 1000); 1704 rcBBox.bottom = FXSYS_round(char_rect.bottom * 1000);
1705 1705
1706 ASSERT(!pdfium::ContainsKey(m_CacheMap, charcode)); 1706 ASSERT(!pdfium::ContainsKey(m_CacheMap, charcode));
1707 CPDF_Type3Char* pCachedChar = pNewChar.release(); 1707 CPDF_Type3Char* pCachedChar = pNewChar.release();
1708 m_CacheMap[charcode] = pCachedChar; 1708 m_CacheMap[charcode] = pCachedChar;
1709 if (pCachedChar->m_pForm->GetPageObjectList()->GetCount() == 0) { 1709 if (pCachedChar->m_pForm->GetPageObjectList()->empty()) {
1710 delete pCachedChar->m_pForm; 1710 delete pCachedChar->m_pForm;
1711 pCachedChar->m_pForm = nullptr; 1711 pCachedChar->m_pForm = nullptr;
1712 } 1712 }
1713 return pCachedChar; 1713 return pCachedChar;
1714 } 1714 }
1715 1715
1716 int CPDF_Type3Font::GetCharWidthF(FX_DWORD charcode, int level) { 1716 int CPDF_Type3Font::GetCharWidthF(FX_DWORD charcode, int level) {
1717 if (charcode >= FX_ArraySize(m_CharWidthL)) 1717 if (charcode >= FX_ArraySize(m_CharWidthL))
1718 charcode = 0; 1718 charcode = 0;
1719 1719
(...skipping 16 matching lines...) Expand all
1736 rect = pChar->m_BBox; 1736 rect = pChar->m_BBox;
1737 } 1737 }
1738 1738
1739 CPDF_Type3Char::CPDF_Type3Char(CPDF_Form* pForm) 1739 CPDF_Type3Char::CPDF_Type3Char(CPDF_Form* pForm)
1740 : m_pForm(pForm), m_pBitmap(nullptr), m_bColored(FALSE) {} 1740 : m_pForm(pForm), m_pBitmap(nullptr), m_bColored(FALSE) {}
1741 1741
1742 CPDF_Type3Char::~CPDF_Type3Char() { 1742 CPDF_Type3Char::~CPDF_Type3Char() {
1743 delete m_pForm; 1743 delete m_pForm;
1744 delete m_pBitmap; 1744 delete m_pBitmap;
1745 } 1745 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698