summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r--core/fpdfapi/render/cpdf_imagecacheentry.cpp6
-rw-r--r--core/fpdfapi/render/cpdf_imagerenderer.cpp8
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_type3cache.cpp10
4 files changed, 14 insertions, 12 deletions
diff --git a/core/fpdfapi/render/cpdf_imagecacheentry.cpp b/core/fpdfapi/render/cpdf_imagecacheentry.cpp
index 751b3eb4b4..392eaba914 100644
--- a/core/fpdfapi/render/cpdf_imagecacheentry.cpp
+++ b/core/fpdfapi/render/cpdf_imagecacheentry.cpp
@@ -34,7 +34,7 @@ CPDF_ImageCacheEntry::~CPDF_ImageCacheEntry() {}
void CPDF_ImageCacheEntry::Reset(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
m_pCachedBitmap.Reset();
if (pBitmap)
- m_pCachedBitmap = pBitmap->Clone();
+ m_pCachedBitmap = pBitmap->Clone(nullptr);
CalcSize();
}
@@ -94,13 +94,13 @@ void CPDF_ImageCacheEntry::ContinueGetCachedBitmap() {
m_dwTimeCount = pPageRenderCache->GetTimeCount();
if (m_pCurBitmap->GetPitch() * m_pCurBitmap->GetHeight() <
FPDF_HUGE_IMAGE_SIZE) {
- m_pCachedBitmap = m_pCurBitmap->Clone();
+ m_pCachedBitmap = m_pCurBitmap->Clone(nullptr);
m_pCurBitmap.Reset();
} else {
m_pCachedBitmap = m_pCurBitmap;
}
if (m_pCurMask) {
- m_pCachedMask = m_pCurMask->Clone();
+ m_pCachedMask = m_pCurMask->Clone(nullptr);
m_pCurMask.Reset();
}
m_pCurBitmap = m_pCachedBitmap;
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp
index b4cc36f6c3..8a963d2be9 100644
--- a/core/fpdfapi/render/cpdf_imagerenderer.cpp
+++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp
@@ -96,7 +96,7 @@ bool CPDF_ImageRenderer::StartRenderDIBSource() {
m_pImageObject->m_GeneralState.GetTransferFunc()->TranslateImage(
m_Loader.m_pBitmap);
if (m_Loader.m_bCached && m_Loader.m_pMask)
- m_Loader.m_pMask = m_Loader.m_pMask->Clone();
+ m_Loader.m_pMask = m_Loader.m_pMask->Clone(nullptr);
m_Loader.m_bCached = false;
}
}
@@ -112,7 +112,7 @@ bool CPDF_ImageRenderer::StartRenderDIBSource() {
}
m_FillArgb = m_pRenderStatus->GetFillArgb(m_pImageObject);
} else if (m_pRenderStatus->m_Options.m_ColorMode == RENDER_COLOR_GRAY) {
- m_pClone = m_pDIBSource->Clone();
+ m_pClone = m_pDIBSource->Clone(nullptr);
m_pClone->ConvertColorScale(m_pRenderStatus->m_Options.m_BackColor,
m_pRenderStatus->m_Options.m_ForeColor);
m_pDIBSource = m_pClone;
@@ -403,7 +403,7 @@ bool CPDF_ImageRenderer::StartDIBSource() {
}
}
#ifdef _SKIA_SUPPORT_
- CFX_RetainPtr<CFX_DIBitmap> premultiplied = m_pDIBSource->Clone();
+ CFX_RetainPtr<CFX_DIBitmap> premultiplied = m_pDIBSource->Clone(nullptr);
if (m_pDIBSource->HasAlpha())
CFX_SkiaDeviceDriver::PreMultiply(premultiplied);
if (m_pRenderStatus->m_pDevice->StartDIBitsWithBlend(
@@ -511,7 +511,7 @@ bool CPDF_ImageRenderer::StartBitmapAlpha() {
int left;
int top;
CFX_RetainPtr<CFX_DIBitmap> pTransformed =
- pAlphaMask->TransformTo(&m_ImageMatrix, left, top);
+ pAlphaMask->TransformTo(&m_ImageMatrix, &left, &top);
if (!pTransformed)
return true;
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 0b304747d4..0a288c4b00 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -2285,7 +2285,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
CFX_RetainPtr<CFX_DIBitmap> pEnlargedBitmap =
DrawPatternBitmap(m_pContext->GetDocument(), m_pContext->GetPageCache(),
pPattern, pObj2Device, 8, 8, m_Options.m_Flags);
- pPatternBitmap = pEnlargedBitmap->StretchTo(width, height);
+ pPatternBitmap = pEnlargedBitmap->StretchTo(width, height, 0, nullptr);
} else {
pPatternBitmap = DrawPatternBitmap(
m_pContext->GetDocument(), m_pContext->GetPageCache(), pPattern,
diff --git a/core/fpdfapi/render/cpdf_type3cache.cpp b/core/fpdfapi/render/cpdf_type3cache.cpp
index 699b24f15c..f113e7a862 100644
--- a/core/fpdfapi/render/cpdf_type3cache.cpp
+++ b/core/fpdfapi/render/cpdf_type3cache.cpp
@@ -146,9 +146,11 @@ std::unique_ptr<CFX_GlyphBitmap> CPDF_Type3Cache::RenderGlyph(
}
pSize->AdjustBlue(top_y, bottom_y, top_line, bottom_line);
pResBitmap = pBitmap->StretchTo(
- (int)(FXSYS_round(image_matrix.a) * retinaScaleX),
- (int)((bFlipped ? top_line - bottom_line : bottom_line - top_line) *
- retinaScaleY));
+ static_cast<int>(FXSYS_round(image_matrix.a) * retinaScaleX),
+ static_cast<int>(
+ (bFlipped ? top_line - bottom_line : bottom_line - top_line) *
+ retinaScaleY),
+ 0, nullptr);
top = top_line;
if (image_matrix.a < 0) {
image_matrix.Scale(retinaScaleX, retinaScaleY);
@@ -160,7 +162,7 @@ std::unique_ptr<CFX_GlyphBitmap> CPDF_Type3Cache::RenderGlyph(
}
if (!pResBitmap) {
image_matrix.Scale(retinaScaleX, retinaScaleY);
- pResBitmap = pBitmap->TransformTo(&image_matrix, left, top);
+ pResBitmap = pBitmap->TransformTo(&image_matrix, &left, &top);
}
if (!pResBitmap)
return nullptr;