| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |