summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp3
-rw-r--r--xfa/fxfa/cxfa_imagerenderer.cpp23
-rw-r--r--xfa/fxfa/cxfa_imagerenderer.h4
3 files changed, 12 insertions, 18 deletions
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index f6806f6841..b24b6dacab 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -1091,8 +1091,7 @@ void XFA_DrawImage(CXFA_Graphics* pGS,
CFX_Matrix(rtFit.width, 0, 0, rtFit.height, rtFit.left, rtFit.top));
mtImage.Concat(matrix);
- CXFA_ImageRenderer imageRender(pRenderDevice, pDIBitmap, &mtImage,
- FXDIB_INTERPOL);
+ CXFA_ImageRenderer imageRender(pRenderDevice, pDIBitmap, &mtImage);
if (!imageRender.Start()) {
return;
}
diff --git a/xfa/fxfa/cxfa_imagerenderer.cpp b/xfa/fxfa/cxfa_imagerenderer.cpp
index dfa45f07d7..f6cb5e9317 100644
--- a/xfa/fxfa/cxfa_imagerenderer.cpp
+++ b/xfa/fxfa/cxfa_imagerenderer.cpp
@@ -15,18 +15,16 @@
CXFA_ImageRenderer::CXFA_ImageRenderer(
CFX_RenderDevice* pDevice,
const RetainPtr<CFX_DIBSource>& pDIBSource,
- const CFX_Matrix* pImage2Device,
- uint32_t flags)
+ const CFX_Matrix* pImage2Device)
: m_pDevice(pDevice),
m_ImageMatrix(*pImage2Device),
- m_pDIBSource(pDIBSource),
- m_Flags(flags) {}
+ m_pDIBSource(pDIBSource) {}
CXFA_ImageRenderer::~CXFA_ImageRenderer() {}
bool CXFA_ImageRenderer::Start() {
if (m_pDevice->StartDIBitsWithBlend(m_pDIBSource, 255, 0, &m_ImageMatrix,
- m_Flags, &m_DeviceHandle,
+ FXDIB_INTERPOL, &m_DeviceHandle,
FXDIB_BLEND_NORMAL)) {
if (m_DeviceHandle) {
m_Status = 3;
@@ -54,7 +52,7 @@ bool CXFA_ImageRenderer::Start() {
clip_box.Intersect(image_rect);
m_Status = 2;
m_pTransformer = pdfium::MakeUnique<CFX_ImageTransformer>(
- pDib, &m_ImageMatrix, m_Flags, &clip_box);
+ pDib, &m_ImageMatrix, FXDIB_INTERPOL, &clip_box);
return true;
}
if (m_ImageMatrix.a < 0)
@@ -66,15 +64,15 @@ bool CXFA_ImageRenderer::Start() {
dest_top = dest_height > 0 ? image_rect.top : image_rect.bottom;
if (m_pDIBSource->IsOpaqueImage()) {
if (m_pDevice->StretchDIBitsWithFlagsAndBlend(
- m_pDIBSource, dest_left, dest_top, dest_width, dest_height, m_Flags,
- FXDIB_BLEND_NORMAL)) {
+ m_pDIBSource, dest_left, dest_top, dest_width, dest_height,
+ FXDIB_INTERPOL, FXDIB_BLEND_NORMAL)) {
return false;
}
}
if (m_pDIBSource->IsAlphaMask()) {
if (m_pDevice->StretchBitMaskWithFlags(m_pDIBSource, dest_left, dest_top,
dest_width, dest_height, 0,
- m_Flags)) {
+ FXDIB_INTERPOL)) {
return false;
}
}
@@ -85,8 +83,8 @@ bool CXFA_ImageRenderer::Start() {
FX_RECT dest_clip(
dest_rect.left - image_rect.left, dest_rect.top - image_rect.top,
dest_rect.right - image_rect.left, dest_rect.bottom - image_rect.top);
- RetainPtr<CFX_DIBitmap> pStretched =
- m_pDIBSource->StretchTo(dest_width, dest_height, m_Flags, &dest_clip);
+ RetainPtr<CFX_DIBitmap> pStretched = m_pDIBSource->StretchTo(
+ dest_width, dest_height, FXDIB_INTERPOL, &dest_clip);
if (pStretched)
CompositeDIBitmap(pStretched, dest_rect.left, dest_rect.top);
@@ -151,8 +149,7 @@ void CXFA_ImageRenderer::CompositeDIBitmap(
if (!pCloneConvert)
return;
- CXFA_ImageRenderer imageRender(m_pDevice, pCloneConvert, &m_ImageMatrix,
- m_Flags);
+ CXFA_ImageRenderer imageRender(m_pDevice, pCloneConvert, &m_ImageMatrix);
if (!imageRender.Start())
return;
diff --git a/xfa/fxfa/cxfa_imagerenderer.h b/xfa/fxfa/cxfa_imagerenderer.h
index 7e013d3243..8ed9ab0c75 100644
--- a/xfa/fxfa/cxfa_imagerenderer.h
+++ b/xfa/fxfa/cxfa_imagerenderer.h
@@ -23,8 +23,7 @@ class CXFA_ImageRenderer {
public:
CXFA_ImageRenderer(CFX_RenderDevice* pDevice,
const RetainPtr<CFX_DIBSource>& pDIBSource,
- const CFX_Matrix* pImage2Device,
- uint32_t flags);
+ const CFX_Matrix* pImage2Device);
~CXFA_ImageRenderer();
bool Start();
@@ -40,7 +39,6 @@ class CXFA_ImageRenderer {
CFX_Matrix m_ImageMatrix;
RetainPtr<CFX_DIBSource> m_pDIBSource;
RetainPtr<CFX_DIBitmap> m_pCloneConvert;
- uint32_t m_Flags;
std::unique_ptr<CFX_ImageTransformer> m_pTransformer;
std::unique_ptr<CFX_ImageRenderer> m_DeviceHandle;
};