From 60cc3baa05136bccf5d77e0b2cf3000817915bcd Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Fri, 5 May 2017 17:11:35 -0400 Subject: Cleanup CStretchEngine and its CWeightTable This CL cleans up a bunch of nits and improves ownership in the CStretchEngine class. Change-Id: I6527f29c50dab329ef58d0724cd24b94fca50ee6 Reviewed-on: https://pdfium-review.googlesource.com/4970 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez --- core/fxge/dib/cfx_bitmapcomposer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (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 bd634ad574..604c0c2ce0 100644 --- a/core/fxge/dib/cfx_bitmapcomposer.cpp +++ b/core/fxge/dib/cfx_bitmapcomposer.cpp @@ -45,6 +45,7 @@ void CFX_BitmapComposer::Compose(const CFX_RetainPtr& pDest, m_bRgbByteOrder = bRgbByteOrder; m_BlendType = blend_type; } + bool CFX_BitmapComposer::SetInfo(int width, int height, FXDIB_Format src_format, @@ -107,11 +108,12 @@ void CFX_BitmapComposer::ComposeScanline(int line, return; } const uint8_t* clip_scan = nullptr; - if (m_pClipMask) + if (m_pClipMask) { clip_scan = m_pClipMask->GetBuffer() + (m_DestTop + line - m_pClipRgn->GetBox().top) * m_pClipMask->GetPitch() + (m_DestLeft - m_pClipRgn->GetBox().left); + } uint8_t* dest_scan = const_cast(m_pBitmap->GetScanline(line + m_DestTop)) + m_DestLeft * m_pBitmap->GetBPP() / 8; -- cgit v1.2.3