summaryrefslogtreecommitdiff
path: root/core/fxge/dib/cfx_bitmapcomposer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/dib/cfx_bitmapcomposer.cpp')
-rw-r--r--core/fxge/dib/cfx_bitmapcomposer.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/fxge/dib/cfx_bitmapcomposer.cpp b/core/fxge/dib/cfx_bitmapcomposer.cpp
index 3854949207..22e1bc9b65 100644
--- a/core/fxge/dib/cfx_bitmapcomposer.cpp
+++ b/core/fxge/dib/cfx_bitmapcomposer.cpp
@@ -112,13 +112,11 @@ void CFX_BitmapComposer::ComposeScanline(int line,
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;
+ uint8_t* dest_scan = m_pBitmap->GetWritableScanline(line + m_DestTop) +
+ m_DestLeft * m_pBitmap->GetBPP() / 8;
uint8_t* dest_alpha_scan =
m_pBitmap->m_pAlphaMask
- ? const_cast<uint8_t*>(
- m_pBitmap->m_pAlphaMask->GetScanline(line + m_DestTop)) +
+ ? m_pBitmap->m_pAlphaMask->GetWritableScanline(line + m_DestTop) +
m_DestLeft
: nullptr;
DoCompose(dest_scan, scanline, m_DestWidth, clip_scan, scan_extra_alpha,