From 6a5c20cd08748da5969cbab756c3e8a6dd27bfbc Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Fri, 7 Apr 2017 14:12:31 -0400 Subject: Remove the ICC transform where it is never initialized. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - All callers of CFX_DIBitmap methods use nullptr as the ICC Transform. - The CFX_ScanlineCompositor is always initialized with a null ICC transform. Many of its methods call TranslateScanline from the ICC module. This method casts just uses ((CLcmsCmm*)pTransform)->m_hTransform, and this should not be done when pTransform is nullptr. Change-Id: I1b846d1f20699fa017cb9a276be3214eb8fabd4b Reviewed-on: https://pdfium-review.googlesource.com/3931 Commit-Queue: Nicolás Peña Reviewed-by: Tom Sepez --- core/fxge/dib/cfx_bitmapcomposer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core/fxge/dib/cfx_bitmapcomposer.cpp') diff --git a/core/fxge/dib/cfx_bitmapcomposer.cpp b/core/fxge/dib/cfx_bitmapcomposer.cpp index bd8dc72094..bd634ad574 100644 --- a/core/fxge/dib/cfx_bitmapcomposer.cpp +++ b/core/fxge/dib/cfx_bitmapcomposer.cpp @@ -26,7 +26,6 @@ void CFX_BitmapComposer::Compose(const CFX_RetainPtr& pDest, bool bFlipY, bool bRgbByteOrder, int alpha_flag, - void* pIccTransform, int blend_type) { m_pBitmap = pDest; m_pClipRgn = pClipRgn; @@ -43,7 +42,6 @@ void CFX_BitmapComposer::Compose(const CFX_RetainPtr& pDest, m_bFlipX = bFlipX; m_bFlipY = bFlipY; m_AlphaFlag = alpha_flag; - m_pIccTransform = pIccTransform; m_bRgbByteOrder = bRgbByteOrder; m_BlendType = blend_type; } @@ -55,7 +53,7 @@ bool CFX_BitmapComposer::SetInfo(int width, if (!m_Compositor.Init(m_pBitmap->GetFormat(), src_format, width, pSrcPalette, m_MaskColor, FXDIB_BLEND_NORMAL, m_pClipMask != nullptr || (m_BitmapAlpha < 255), - m_bRgbByteOrder, m_AlphaFlag, m_pIccTransform)) { + m_bRgbByteOrder, m_AlphaFlag)) { return false; } if (m_bVertical) { -- cgit v1.2.3