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 /core/fpdfapi | |
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 'core/fpdfapi')
-rw-r--r-- | core/fpdfapi/render/cpdf_imagerenderer.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/render/cpdf_type3cache.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp index da63f556a7..362cf558f7 100644 --- a/core/fpdfapi/render/cpdf_imagerenderer.cpp +++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp @@ -416,7 +416,7 @@ bool CPDF_ImageRenderer::StartDIBBase() { clip_box.Intersect(image_rect); m_Status = 2; m_pTransformer = pdfium::MakeUnique<CFX_ImageTransformer>( - m_pDIBBase, &m_ImageMatrix, m_Flags, &clip_box); + m_pDIBBase, m_ImageMatrix, m_Flags, &clip_box); return true; } if (m_ImageMatrix.a < 0) @@ -485,7 +485,7 @@ bool CPDF_ImageRenderer::StartBitmapAlpha() { int left; int top; 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_type3cache.cpp b/core/fpdfapi/render/cpdf_type3cache.cpp index a2b4538ef4..ea15a94ca8 100644 --- a/core/fpdfapi/render/cpdf_type3cache.cpp +++ b/core/fpdfapi/render/cpdf_type3cache.cpp @@ -154,7 +154,7 @@ std::unique_ptr<CFX_GlyphBitmap> CPDF_Type3Cache::RenderGlyph( } } if (!pResBitmap) - pResBitmap = pBitmap->TransformTo(&image_matrix, &left, &top); + pResBitmap = pBitmap->TransformTo(image_matrix, &left, &top); if (!pResBitmap) return nullptr; |