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

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp

Issue 1539983002: Remove CFX_MapPtrToPtr in CFX_PageRenderCache (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Address review Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp ('k') | core/src/fpdfapi/fpdf_render/render_int.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 7b34c5721a99d96a37560b70b9e3040816f734fd..fafba95527ea2a609d9b81860418864f411ae7e8 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -1560,17 +1560,19 @@ FX_BOOL CPDF_ProgressiveImageLoaderHandle::Start(
ret = pCache->StartGetCachedBitmap(pImage->m_pImage->GetStream(), bStdCS,
GroupFamily, bLoadMask, pRenderStatus,
m_nDownsampleWidth, m_nDownsampleHeight);
- if (ret == FALSE) {
+ if (!ret) {
m_pImageLoader->m_bCached = TRUE;
- m_pImageLoader->m_pBitmap = pCache->m_pCurImageCache->DetachBitmap();
- m_pImageLoader->m_pMask = pCache->m_pCurImageCache->DetachMask();
- m_pImageLoader->m_MatteColor = pCache->m_pCurImageCache->m_MatteColor;
+ m_pImageLoader->m_pBitmap =
+ pCache->GetCurImageCacheEntry()->DetachBitmap();
+ m_pImageLoader->m_pMask = pCache->GetCurImageCacheEntry()->DetachMask();
+ m_pImageLoader->m_MatteColor =
+ pCache->GetCurImageCacheEntry()->m_MatteColor;
}
} else {
ret = pImage->m_pImage->StartLoadDIBSource(pRenderStatus->m_pFormResource,
pRenderStatus->m_pPageResource,
bStdCS, GroupFamily, bLoadMask);
- if (ret == FALSE) {
+ if (!ret) {
m_pImageLoader->m_bCached = FALSE;
m_pImageLoader->m_pBitmap = m_pImage->m_pImage->DetachBitmap();
m_pImageLoader->m_pMask = m_pImage->m_pImage->DetachMask();
@@ -1583,15 +1585,17 @@ FX_BOOL CPDF_ProgressiveImageLoaderHandle::Continue(IFX_Pause* pPause) {
FX_BOOL ret;
if (m_pCache) {
ret = m_pCache->Continue(pPause);
- if (ret == FALSE) {
+ if (!ret) {
m_pImageLoader->m_bCached = TRUE;
- m_pImageLoader->m_pBitmap = m_pCache->m_pCurImageCache->DetachBitmap();
- m_pImageLoader->m_pMask = m_pCache->m_pCurImageCache->DetachMask();
- m_pImageLoader->m_MatteColor = m_pCache->m_pCurImageCache->m_MatteColor;
+ m_pImageLoader->m_pBitmap =
+ m_pCache->GetCurImageCacheEntry()->DetachBitmap();
+ m_pImageLoader->m_pMask = m_pCache->GetCurImageCacheEntry()->DetachMask();
+ m_pImageLoader->m_MatteColor =
+ m_pCache->GetCurImageCacheEntry()->m_MatteColor;
}
} else {
ret = m_pImage->m_pImage->Continue(pPause);
- if (ret == FALSE) {
+ if (!ret) {
m_pImageLoader->m_bCached = FALSE;
m_pImageLoader->m_pBitmap = m_pImage->m_pImage->DetachBitmap();
m_pImageLoader->m_pMask = m_pImage->m_pImage->DetachMask();
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp ('k') | core/src/fpdfapi/fpdf_render/render_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698