diff options
author | Nicolas Pena <npm@chromium.org> | 2017-04-07 14:12:31 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-07 18:29:13 +0000 |
commit | 6a5c20cd08748da5969cbab756c3e8a6dd27bfbc (patch) | |
tree | 09a5d7e2666b166dc55e94a48270f17741d22b22 /core/fxge/skia | |
parent | 1e8c39f18df6e597e079cce13d18d72631ef0fb9 (diff) | |
download | pdfium-6a5c20cd08748da5969cbab756c3e8a6dd27bfbc.tar.xz |
Remove the ICC transform where it is never initialized.
- 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 <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/skia')
-rw-r--r-- | core/fxge/skia/fx_skia_device.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index 429510d30e..c9bc6f472f 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -1891,14 +1891,14 @@ bool CFX_SkiaDeviceDriver::SetDIBits( #ifdef _SKIA_SUPPORT_PATHS_ Flush(); if (pBitmap->IsAlphaMask()) { - return m_pBitmap->CompositeMask( - left, top, pSrcRect->Width(), pSrcRect->Height(), pBitmap, argb, - pSrcRect->left, pSrcRect->top, blend_type, m_pClipRgn.get(), - m_bRgbByteOrder, 0, nullptr); + return m_pBitmap->CompositeMask(left, top, pSrcRect->Width(), + pSrcRect->Height(), pBitmap, argb, + pSrcRect->left, pSrcRect->top, blend_type, + m_pClipRgn.get(), m_bRgbByteOrder, 0); } return m_pBitmap->CompositeBitmap( left, top, pSrcRect->Width(), pSrcRect->Height(), pBitmap, pSrcRect->left, - pSrcRect->top, blend_type, m_pClipRgn.get(), m_bRgbByteOrder, nullptr); + pSrcRect->top, blend_type, m_pClipRgn.get(), m_bRgbByteOrder); #endif // _SKIA_SUPPORT_PATHS_ } @@ -1944,7 +1944,7 @@ bool CFX_SkiaDeviceDriver::StretchDIBits( dest_clip.Intersect(*pClipRect); CFX_BitmapComposer composer; composer.Compose(m_pBitmap, m_pClipRgn.get(), 255, argb, dest_clip, false, - false, false, m_bRgbByteOrder, 0, nullptr, blend_type); + false, false, m_bRgbByteOrder, 0, blend_type); dest_clip.Offset(-dest_rect.left, -dest_rect.top); CFX_ImageStretcher stretcher(&composer, pSource, dest_width, dest_height, dest_clip, flags); @@ -2011,7 +2011,7 @@ bool CFX_SkiaDeviceDriver::StartDIBits( m_pBitmap->UnPreMultiply(); *handle = pdfium::MakeUnique<CFX_ImageRenderer>(); (*handle)->Start(m_pBitmap, m_pClipRgn.get(), pSource, bitmap_alpha, argb, - pMatrix, render_flags, m_bRgbByteOrder, 0, nullptr); + pMatrix, render_flags, m_bRgbByteOrder); #endif // _SKIA_SUPPORT_PATHS_ return true; } |