diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-24 23:53:03 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-24 23:53:03 +0000 |
commit | 98d1b48e9a3471a02968f3d12692645fa0fcb50d (patch) | |
tree | 7ae40e8cef9500e737f9576bba908ad23bf80928 /xfa | |
parent | 030bfc05d3460eabaa059f9561897cc1279bd60f (diff) | |
download | pdfium-98d1b48e9a3471a02968f3d12692645fa0fcb50d.tar.xz |
Clean up CFX_ImageTransformer parameters.
- A valid matrix is always passed in, so make the parameter const-ref.
Since it is not obvious who owns the passed in matrix, make a copy
with the corresponding matrix member.
- Since the matrix parameter is const-ref, CFX_DIBBase::TransformTo()
can also have a const-ref matrix parameter.
- |flags| should be uint32_t, since |m_Flags| is.
- |pClips| is only used inside the ctor, so remove |m_pClip|.
Change-Id: If3d58a3fd28fa72b4ac7caac15f49a8057c594db
Reviewed-on: https://pdfium-review.googlesource.com/c/44541
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fxfa/cxfa_imagerenderer.cpp | 2 | ||||
-rw-r--r-- | xfa/fxgraphics/cxfa_graphics.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fxfa/cxfa_imagerenderer.cpp b/xfa/fxfa/cxfa_imagerenderer.cpp index 9f65eaa07c..5f90b3cff6 100644 --- a/xfa/fxfa/cxfa_imagerenderer.cpp +++ b/xfa/fxfa/cxfa_imagerenderer.cpp @@ -49,7 +49,7 @@ bool CXFA_ImageRenderer::Start() { clip_box.Intersect(image_rect); m_Status = 2; m_pTransformer = pdfium::MakeUnique<CFX_ImageTransformer>( - pDib, &m_ImageMatrix, FXDIB_INTERPOL, &clip_box); + pDib, m_ImageMatrix, FXDIB_INTERPOL, &clip_box); return true; } if (m_ImageMatrix.a < 0) diff --git a/xfa/fxgraphics/cxfa_graphics.cpp b/xfa/fxgraphics/cxfa_graphics.cpp index 03689da618..32499271b6 100644 --- a/xfa/fxgraphics/cxfa_graphics.cpp +++ b/xfa/fxgraphics/cxfa_graphics.cpp @@ -423,7 +423,7 @@ void CXFA_Graphics::SetDIBitsWithMatrix(const RetainPtr<CFX_DIBBase>& source, int32_t left; int32_t top; RetainPtr<CFX_DIBitmap> bmp1 = source->FlipImage(false, true); - RetainPtr<CFX_DIBitmap> bmp2 = bmp1->TransformTo(&m, &left, &top); + RetainPtr<CFX_DIBitmap> bmp2 = bmp1->TransformTo(m, &left, &top); m_renderDevice->SetDIBits(bmp2, left, top); } } |