summaryrefslogtreecommitdiff
path: root/core/fxge/dib/cfx_bitmapcomposer.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-05-05 17:11:35 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-05 22:05:14 +0000
commit60cc3baa05136bccf5d77e0b2cf3000817915bcd (patch)
tree425aa82185a2ebd5257ab042644f3f0fd582cecf /core/fxge/dib/cfx_bitmapcomposer.cpp
parent54b9166366085b30b7ee3094c2b71cd36e377153 (diff)
downloadpdfium-60cc3baa05136bccf5d77e0b2cf3000817915bcd.tar.xz
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 <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/dib/cfx_bitmapcomposer.cpp')
-rw-r--r--core/fxge/dib/cfx_bitmapcomposer.cpp4
1 files changed, 3 insertions, 1 deletions
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<CFX_DIBitmap>& 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<uint8_t*>(m_pBitmap->GetScanline(line + m_DestTop)) +
m_DestLeft * m_pBitmap->GetBPP() / 8;