summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_imagecacheentry.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-24 21:55:46 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-24 21:55:46 +0000
commite6ff2ebfaa19421c8d932f4d275548156ae2e13c (patch)
treea549775ce9d4e999f8a23542524adba8c5ca42ea /core/fpdfapi/render/cpdf_imagecacheentry.cpp
parent16d18d935d055b74e05f615c0325318a329a7fe1 (diff)
downloadpdfium-e6ff2ebfaa19421c8d932f4d275548156ae2e13c.tar.xz
Rename CFX_DIBSource to CFX_DIBBase.
It is not a source from which you can get CFX_DIBs, but rather a base class from which all DIBs inherit. Do the same thing for the CPDF_DIBSource wrapper class. Mechanical change apart from adding a one-line comment in cfx_dibbase.h Change-Id: Id2bde87813ca301d9fafc55ce08d703dfc6a7184 Reviewed-on: https://pdfium-review.googlesource.com/41352 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_imagecacheentry.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_imagecacheentry.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/core/fpdfapi/render/cpdf_imagecacheentry.cpp b/core/fpdfapi/render/cpdf_imagecacheentry.cpp
index 615a44d869..681c39e624 100644
--- a/core/fpdfapi/render/cpdf_imagecacheentry.cpp
+++ b/core/fpdfapi/render/cpdf_imagecacheentry.cpp
@@ -13,7 +13,7 @@
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
-#include "core/fpdfapi/render/cpdf_dibsource.h"
+#include "core/fpdfapi/render/cpdf_dibbase.h"
#include "core/fpdfapi/render/cpdf_pagerendercache.h"
#include "core/fpdfapi/render/cpdf_rendercontext.h"
#include "core/fpdfapi/render/cpdf_renderstatus.h"
@@ -37,22 +37,22 @@ void CPDF_ImageCacheEntry::Reset(const RetainPtr<CFX_DIBitmap>& pBitmap) {
}
static uint32_t FPDF_ImageCache_EstimateImageSize(
- const RetainPtr<CFX_DIBSource>& pDIB) {
+ const RetainPtr<CFX_DIBBase>& pDIB) {
return pDIB && pDIB->GetBuffer()
? (uint32_t)pDIB->GetHeight() * pDIB->GetPitch() +
(uint32_t)pDIB->GetPaletteSize() * 4
: 0;
}
-RetainPtr<CFX_DIBSource> CPDF_ImageCacheEntry::DetachBitmap() {
+RetainPtr<CFX_DIBBase> CPDF_ImageCacheEntry::DetachBitmap() {
return std::move(m_pCurBitmap);
}
-RetainPtr<CFX_DIBSource> CPDF_ImageCacheEntry::DetachMask() {
+RetainPtr<CFX_DIBBase> CPDF_ImageCacheEntry::DetachMask() {
return std::move(m_pCurMask);
}
-CPDF_DIBSource::LoadState CPDF_ImageCacheEntry::StartGetCachedBitmap(
+CPDF_DIBBase::LoadState CPDF_ImageCacheEntry::StartGetCachedBitmap(
const CPDF_Dictionary* pFormResources,
CPDF_Dictionary* pPageResources,
bool bStdCS,
@@ -64,32 +64,32 @@ CPDF_DIBSource::LoadState CPDF_ImageCacheEntry::StartGetCachedBitmap(
if (m_pCachedBitmap) {
m_pCurBitmap = m_pCachedBitmap;
m_pCurMask = m_pCachedMask;
- return CPDF_DIBSource::LoadState::kSuccess;
+ return CPDF_DIBBase::LoadState::kSuccess;
}
- m_pCurBitmap = pdfium::MakeRetain<CPDF_DIBSource>();
- CPDF_DIBSource::LoadState ret =
- m_pCurBitmap.As<CPDF_DIBSource>()->StartLoadDIBSource(
+ m_pCurBitmap = pdfium::MakeRetain<CPDF_DIBBase>();
+ CPDF_DIBBase::LoadState ret =
+ m_pCurBitmap.As<CPDF_DIBBase>()->StartLoadDIBBase(
m_pDocument.Get(), m_pImage->GetStream(), true, pFormResources,
pPageResources, bStdCS, GroupFamily, bLoadMask);
- if (ret == CPDF_DIBSource::LoadState::kContinue)
- return CPDF_DIBSource::LoadState::kContinue;
+ if (ret == CPDF_DIBBase::LoadState::kContinue)
+ return CPDF_DIBBase::LoadState::kContinue;
- if (ret == CPDF_DIBSource::LoadState::kSuccess)
+ if (ret == CPDF_DIBBase::LoadState::kSuccess)
ContinueGetCachedBitmap(pRenderStatus);
else
m_pCurBitmap.Reset();
- return CPDF_DIBSource::LoadState::kFail;
+ return CPDF_DIBBase::LoadState::kFail;
}
bool CPDF_ImageCacheEntry::Continue(PauseIndicatorIface* pPause,
CPDF_RenderStatus* pRenderStatus) {
- CPDF_DIBSource::LoadState ret =
- m_pCurBitmap.As<CPDF_DIBSource>()->ContinueLoadDIBSource(pPause);
- if (ret == CPDF_DIBSource::LoadState::kContinue)
+ CPDF_DIBBase::LoadState ret =
+ m_pCurBitmap.As<CPDF_DIBBase>()->ContinueLoadDIBBase(pPause);
+ if (ret == CPDF_DIBBase::LoadState::kContinue)
return true;
- if (ret == CPDF_DIBSource::LoadState::kSuccess)
+ if (ret == CPDF_DIBBase::LoadState::kSuccess)
ContinueGetCachedBitmap(pRenderStatus);
else
m_pCurBitmap.Reset();
@@ -98,8 +98,8 @@ bool CPDF_ImageCacheEntry::Continue(PauseIndicatorIface* pPause,
void CPDF_ImageCacheEntry::ContinueGetCachedBitmap(
CPDF_RenderStatus* pRenderStatus) {
- m_MatteColor = m_pCurBitmap.As<CPDF_DIBSource>()->GetMatteColor();
- m_pCurMask = m_pCurBitmap.As<CPDF_DIBSource>()->DetachMask();
+ m_MatteColor = m_pCurBitmap.As<CPDF_DIBBase>()->GetMatteColor();
+ m_pCurMask = m_pCurBitmap.As<CPDF_DIBBase>()->DetachMask();
CPDF_RenderContext* pContext = pRenderStatus->GetContext();
CPDF_PageRenderCache* pPageRenderCache = pContext->GetPageCache();
m_dwTimeCount = pPageRenderCache->GetTimeCount();