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/fxge/dib/cfx_imagetransformer.h | |
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/fxge/dib/cfx_imagetransformer.h')
-rw-r--r-- | core/fxge/dib/cfx_imagetransformer.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/fxge/dib/cfx_imagetransformer.h b/core/fxge/dib/cfx_imagetransformer.h index c19e744c1a..ecd91872c0 100644 --- a/core/fxge/dib/cfx_imagetransformer.h +++ b/core/fxge/dib/cfx_imagetransformer.h @@ -21,8 +21,8 @@ class CFX_ImageStretcher; class CFX_ImageTransformer { public: CFX_ImageTransformer(const RetainPtr<CFX_DIBBase>& pSrc, - const CFX_Matrix* pMatrix, - int flags, + const CFX_Matrix& matrix, + uint32_t flags, const FX_RECT* pClip); ~CFX_ImageTransformer(); @@ -99,15 +99,14 @@ class CFX_ImageTransformer { std::function<void(const DownSampleData&, uint8_t*)> func); RetainPtr<CFX_DIBBase> const m_pSrc; - UnownedPtr<const CFX_Matrix> const m_pMatrix; - const FX_RECT* const m_pClip; + const CFX_Matrix m_matrix; FX_RECT m_StretchClip; FX_RECT m_result; CFX_Matrix m_dest2stretch; std::unique_ptr<CFX_ImageStretcher> m_Stretcher; CFX_BitmapStorer m_Storer; const uint32_t m_Flags; - int m_Status; + int m_Status = 0; }; #endif // CORE_FXGE_DIB_CFX_IMAGETRANSFORMER_H_ |