summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-16 16:20:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-16 16:20:08 +0000
commit048d7f7c1e0c6c42679a5646ae9db5b7d98ed755 (patch)
tree42701f3662d9454d7ce23fcf8cae1c3108763095 /core/fpdfapi
parent2a3377ce9a39d47d29c95d5db64690ad749d8c94 (diff)
downloadpdfium-048d7f7c1e0c6c42679a5646ae9db5b7d98ed755.tar.xz
Remove more optional args in core/
Change-Id: I6a2bd03e00ad4e3d57f6931c0c6cf4ae0c760afb Reviewed-on: https://pdfium-review.googlesource.com/40290 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/parser/cpdf_document.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_document.h2
-rw-r--r--core/fpdfapi/render/cpdf_devicebuffer.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp23
4 files changed, 18 insertions, 11 deletions
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index cda6bd5582..1dd801de69 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -434,7 +434,7 @@ int CPDF_Document::GetPageIndex(uint32_t objnum) {
return -1;
int start_index = 0;
- int found_index = FindPageIndex(pPages, &skip_count, objnum, &start_index);
+ int found_index = FindPageIndex(pPages, &skip_count, objnum, &start_index, 0);
// Corrupt page tree may yield out-of-range results.
if (!pdfium::IndexInBounds(m_PageList, found_index))
diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h
index 0c6ec79c72..1cbc5fcc42 100644
--- a/core/fpdfapi/parser/cpdf_document.h
+++ b/core/fpdfapi/parser/cpdf_document.h
@@ -133,7 +133,7 @@ class CPDF_Document : public Observable<CPDF_Document>,
uint32_t* skip_count,
uint32_t objnum,
int* index,
- int level = 0) const;
+ int level) const;
std::unique_ptr<CPDF_Object> ParseIndirectObject(uint32_t objnum) override;
void LoadDocInternal();
size_t CalculateEncodingDict(int charset, CPDF_Dictionary* pBaseDict);
diff --git a/core/fpdfapi/render/cpdf_devicebuffer.cpp b/core/fpdfapi/render/cpdf_devicebuffer.cpp
index def2c2c7ca..4c8da1c327 100644
--- a/core/fpdfapi/render/cpdf_devicebuffer.cpp
+++ b/core/fpdfapi/render/cpdf_devicebuffer.cpp
@@ -65,7 +65,7 @@ void CPDF_DeviceBuffer::OutputToDevice() {
m_pBitmap->GetHeight());
m_pContext->GetBackground(pBuffer, m_pObject.Get(), nullptr, &m_Matrix);
pBuffer->CompositeBitmap(0, 0, pBuffer->GetWidth(), pBuffer->GetHeight(),
- m_pBitmap, 0, 0);
+ m_pBitmap, 0, 0, FXDIB_BLEND_NORMAL, nullptr, false);
m_pDevice->StretchDIBits(pBuffer, m_Rect.left, m_Rect.top, m_Rect.Width(),
m_Rect.Height());
}
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 76c5e87228..f8a2b5de75 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -2325,10 +2325,12 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
} else {
if (pPattern->colored()) {
pScreen->CompositeBitmap(start_x, start_y, width, height,
- pPatternBitmap, 0, 0);
+ pPatternBitmap, 0, 0, FXDIB_BLEND_NORMAL,
+ nullptr, false);
} else {
pScreen->CompositeMask(start_x, start_y, width, height,
- pPatternBitmap, fill_argb, 0, 0);
+ pPatternBitmap, fill_argb, 0, 0,
+ FXDIB_BLEND_NORMAL, nullptr, false, 0);
}
}
}
@@ -2447,15 +2449,18 @@ void CPDF_RenderStatus::CompositeDIBitmap(
RetainPtr<CFX_DIBitmap> pForeBitmap = m_pDevice->GetBitmap();
pClone->CompositeBitmap(0, 0, pClone->GetWidth(), pClone->GetHeight(),
- pForeBitmap, rect.left, rect.top);
+ pForeBitmap, rect.left, rect.top,
+ FXDIB_BLEND_NORMAL, nullptr, false);
left = std::min(left, 0);
top = std::min(top, 0);
if (pDIBitmap->IsAlphaMask()) {
pClone->CompositeMask(0, 0, pClone->GetWidth(), pClone->GetHeight(),
- pDIBitmap, mask_argb, left, top, blend_mode);
+ pDIBitmap, mask_argb, left, top, blend_mode,
+ nullptr, false, 0);
} else {
pClone->CompositeBitmap(0, 0, pClone->GetWidth(), pClone->GetHeight(),
- pDIBitmap, left, top, blend_mode);
+ pDIBitmap, left, top, blend_mode, nullptr,
+ false);
}
} else {
pClone = pDIBitmap;
@@ -2483,11 +2488,12 @@ void CPDF_RenderStatus::CompositeDIBitmap(
if (pDIBitmap->IsAlphaMask()) {
pBackdrop->CompositeMask(left - back_left, top - back_top,
pDIBitmap->GetWidth(), pDIBitmap->GetHeight(),
- pDIBitmap, mask_argb, 0, 0, blend_mode);
+ pDIBitmap, mask_argb, 0, 0, blend_mode, nullptr,
+ false, 0);
} else {
pBackdrop->CompositeBitmap(left - back_left, top - back_top,
pDIBitmap->GetWidth(), pDIBitmap->GetHeight(),
- pDIBitmap, 0, 0, blend_mode);
+ pDIBitmap, 0, 0, blend_mode, nullptr, false);
}
auto pBackdrop1 = pdfium::MakeRetain<CFX_DIBitmap>();
@@ -2495,7 +2501,8 @@ void CPDF_RenderStatus::CompositeDIBitmap(
FXDIB_Rgb32);
pBackdrop1->Clear((uint32_t)-1);
pBackdrop1->CompositeBitmap(0, 0, pBackdrop->GetWidth(),
- pBackdrop->GetHeight(), pBackdrop, 0, 0);
+ pBackdrop->GetHeight(), pBackdrop, 0, 0,
+ FXDIB_BLEND_NORMAL, nullptr, false);
pBackdrop = std::move(pBackdrop1);
m_pDevice->SetDIBits(pBackdrop, back_left, back_top);
}