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/win32/fx_win32_device.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'core/fxge/win32') diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index d4abcbe251..39533e1ef6 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -1224,8 +1224,7 @@ bool CGdiDisplayDriver::SetDIBits(const CFX_RetainPtr& pSource, if (!background->Create(width, height, FXDIB_Rgb32) || !GetDIBits(background, left, top) || !background->CompositeMask(0, 0, width, height, pSource, color, 0, 0, - FXDIB_BLEND_NORMAL, nullptr, false, 0, - nullptr)) { + FXDIB_BLEND_NORMAL, nullptr, false, 0)) { return false; } FX_RECT src_rect(0, 0, width, height); @@ -1244,7 +1243,7 @@ bool CGdiDisplayDriver::SetDIBits(const CFX_RetainPtr& pSource, !GetDIBits(bitmap, left, top) || !bitmap->CompositeBitmap(0, 0, width, height, pSource, pSrcRect->left, pSrcRect->top, FXDIB_BLEND_NORMAL, nullptr, - false, nullptr)) { + false)) { return false; } FX_RECT src_rect(0, 0, width, height); @@ -1321,7 +1320,7 @@ bool CGdiDisplayDriver::StretchDIBits( image_rect.top + clip_rect.top) || !background->CompositeMask(0, 0, clip_width, clip_height, pStretched, color, 0, 0, FXDIB_BLEND_NORMAL, nullptr, - false, 0, nullptr)) { + false, 0)) { return false; } -- cgit v1.2.3