From 48f776f7e801d719683b251dc21ee8c0e3250d90 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Thu, 5 Jan 2017 13:22:17 -0500 Subject: Remove unused CPDF_ImageCacheEntry::GetCachedBitmap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GetCachedBitmap method is not being used. This removal simplifies some of the code. Change-Id: I075c245c3511e8a1b595c8ba148991f7c838f504 Reviewed-on: https://pdfium-review.googlesource.com/2154 Commit-Queue: Nicolás Peña Reviewed-by: Tom Sepez --- core/fpdfapi/render/cpdf_imagecacheentry.cpp | 41 ---------------------------- 1 file changed, 41 deletions(-) (limited to 'core/fpdfapi/render/cpdf_imagecacheentry.cpp') diff --git a/core/fpdfapi/render/cpdf_imagecacheentry.cpp b/core/fpdfapi/render/cpdf_imagecacheentry.cpp index 84efd925c8..f11cae888d 100644 --- a/core/fpdfapi/render/cpdf_imagecacheentry.cpp +++ b/core/fpdfapi/render/cpdf_imagecacheentry.cpp @@ -45,47 +45,6 @@ static uint32_t FPDF_ImageCache_EstimateImageSize(const CFX_DIBSource* pDIB) { : 0; } -bool CPDF_ImageCacheEntry::GetCachedBitmap(CFX_DIBSource*& pBitmap, - CFX_DIBSource*& pMask, - uint32_t& MatteColor, - CPDF_Dictionary* pPageResources, - bool bStdCS, - uint32_t GroupFamily, - bool bLoadMask, - CPDF_RenderStatus* pRenderStatus, - int32_t downsampleWidth, - int32_t downsampleHeight) { - if (m_pCachedBitmap) { - pBitmap = m_pCachedBitmap.get(); - pMask = m_pCachedMask.get(); - MatteColor = m_MatteColor; - return true; - } - if (!pRenderStatus) - return false; - - CPDF_RenderContext* pContext = pRenderStatus->GetContext(); - CPDF_PageRenderCache* pPageRenderCache = pContext->GetPageCache(); - m_dwTimeCount = pPageRenderCache->GetTimeCount(); - std::unique_ptr pSrc = pdfium::MakeUnique(); - CPDF_DIBSource* pMaskSrc = nullptr; - if (!pSrc->Load(m_pDocument, m_pStream, &pMaskSrc, &MatteColor, - pRenderStatus->m_pFormResource, pPageResources, bStdCS, - GroupFamily, bLoadMask)) { - pBitmap = nullptr; - return false; - } - m_MatteColor = MatteColor; - m_pCachedBitmap = std::move(pSrc); - if (pMaskSrc) - m_pCachedMask = pdfium::WrapUnique(pMaskSrc); - - pBitmap = m_pCachedBitmap.get(); - pMask = m_pCachedMask.get(); - CalcSize(); - return false; -} - CFX_DIBSource* CPDF_ImageCacheEntry::DetachBitmap() { CFX_DIBSource* pDIBSource = m_pCurBitmap; m_pCurBitmap = nullptr; -- cgit v1.2.3