From 3851aff62c7ad2f9c942b4d5d095ec0e6610bb84 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 21 Mar 2018 17:24:46 +0000 Subject: Add helpers to work with FXDIB_Format. Helper functions make getting the bpp and component count more readable. Change-Id: Ie0f97d52136d11ef5251f6e22748e87aea289ae1 Reviewed-on: https://pdfium-review.googlesource.com/28572 Commit-Queue: Lei Zhang Reviewed-by: Henrique Nakashima --- core/fxge/dib/cstretchengine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fxge/dib/cstretchengine.cpp') diff --git a/core/fxge/dib/cstretchengine.cpp b/core/fxge/dib/cstretchengine.cpp index b7aa672a46..9d3923adab 100644 --- a/core/fxge/dib/cstretchengine.cpp +++ b/core/fxge/dib/cstretchengine.cpp @@ -229,8 +229,8 @@ CStretchEngine::CStretchEngine(ScanlineComposerIface* pDestBitmap, const RetainPtr& pSrcBitmap, int flags) : m_DestFormat(dest_format), - m_DestBpp(dest_format & 0xff), - m_SrcBpp(pSrcBitmap->GetFormat() & 0xff), + m_DestBpp(GetBppFromFormat(dest_format)), + m_SrcBpp(GetBppFromFormat(pSrcBitmap->GetFormat())), m_bHasAlpha(pSrcBitmap->GetFormat() & 0x200), m_pSource(pSrcBitmap), m_pSrcPalette(pSrcBitmap->GetPalette()), -- cgit v1.2.3