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

Side by Side Diff: core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp

Issue 429593005: Fix a few more warnings in chromium_code mode. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 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
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 "../../../include/fpdfapi/fpdf_render.h" 7 #include "../../../include/fpdfapi/fpdf_render.h"
8 #include "../../../include/fpdfapi/fpdf_pageobj.h" 8 #include "../../../include/fpdfapi/fpdf_pageobj.h"
9 #include "../../../include/fxge/fx_ge.h" 9 #include "../../../include/fxge/fx_ge.h"
10 #include "../fpdf_page/pageint.h" 10 #include "../fpdf_page/pageint.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return; 164 return;
165 } 165 }
166 pImageCache = FX_NEW CPDF_ImageCache(m_pPage->m_pDocument, pStream); 166 pImageCache = FX_NEW CPDF_ImageCache(m_pPage->m_pDocument, pStream);
167 m_ImageCaches.SetAt(pStream, pImageCache); 167 m_ImageCaches.SetAt(pStream, pImageCache);
168 } 168 }
169 int oldsize = pImageCache->EstimateSize(); 169 int oldsize = pImageCache->EstimateSize();
170 pImageCache->Reset(pBitmap); 170 pImageCache->Reset(pBitmap);
171 m_nCacheSize = pImageCache->EstimateSize() - oldsize; 171 m_nCacheSize = pImageCache->EstimateSize() - oldsize;
172 } 172 }
173 CPDF_ImageCache::CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream) 173 CPDF_ImageCache::CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream)
174 : m_pDocument(pDoc) 174 : m_dwTimeCount(0)
175 , m_pCurBitmap(NULL)
176 , m_pCurMask(NULL)
177 , m_MatteColor(0)
178 , m_pRenderStatus(NULL)
179 , m_pDocument(pDoc)
175 , m_pStream(pStream) 180 , m_pStream(pStream)
176 , m_pCachedBitmap(NULL) 181 , m_pCachedBitmap(NULL)
177 , m_pCachedMask(NULL) 182 , m_pCachedMask(NULL)
178 , m_dwCacheSize(0) 183 , m_dwCacheSize(0)
179 , m_dwTimeCount(0)
180 , m_pCurBitmap(NULL)
181 , m_pCurMask(NULL)
182 , m_MatteColor(0)
183 , m_pRenderStatus(NULL)
184 { 184 {
185 } 185 }
186 CPDF_ImageCache::~CPDF_ImageCache() 186 CPDF_ImageCache::~CPDF_ImageCache()
187 { 187 {
188 if (m_pCachedBitmap) { 188 if (m_pCachedBitmap) {
189 delete m_pCachedBitmap; 189 delete m_pCachedBitmap;
190 m_pCachedBitmap = NULL; 190 m_pCachedBitmap = NULL;
191 } 191 }
192 if (m_pCachedMask) { 192 if (m_pCachedMask) {
193 delete m_pCachedMask; 193 delete m_pCachedMask;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 380 }
381 void CPDF_Document::ClearRenderFont() 381 void CPDF_Document::ClearRenderFont()
382 { 382 {
383 if (m_pDocRender) { 383 if (m_pDocRender) {
384 CFX_FontCache* pCache = m_pDocRender->GetFontCache(); 384 CFX_FontCache* pCache = m_pDocRender->GetFontCache();
385 if (pCache) { 385 if (pCache) {
386 pCache->FreeCache(FALSE); 386 pCache->FreeCache(FALSE);
387 } 387 }
388 } 388 }
389 } 389 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698