diff options
Diffstat (limited to 'core/fxge/agg')
-rw-r--r-- | core/fxge/agg/fx_agg_driver.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp index affabba797..3d35e12e45 100644 --- a/core/fxge/agg/fx_agg_driver.cpp +++ b/core/fxge/agg/fx_agg_driver.cpp @@ -164,9 +164,8 @@ void RgbByteOrderTransferBitmap(const RetainPtr<CFX_DIBitmap>& pBitmap, if (dest_format == src_format) { for (int row = 0; row < height; row++) { uint8_t* dest_scan = buffer + (dest_top + row) * pitch + dest_left * Bpp; - uint8_t* src_scan = - const_cast<uint8_t*>(pSrcBitmap->GetScanline(src_top + row)) + - src_left * Bpp; + const uint8_t* src_scan = + pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp; if (Bpp == 4) { for (int col = 0; col < width; col++) { FXARGB_SETDIB(dest_scan, ArgbEncode(src_scan[3], src_scan[0], @@ -191,9 +190,8 @@ void RgbByteOrderTransferBitmap(const RetainPtr<CFX_DIBitmap>& pBitmap, ASSERT(src_format == FXDIB_Rgb32); for (int row = 0; row < height; row++) { uint8_t* dest_scan = dest_buf + row * pitch; - uint8_t* src_scan = - const_cast<uint8_t*>(pSrcBitmap->GetScanline(src_top + row)) + - src_left * 4; + const uint8_t* src_scan = + pSrcBitmap->GetScanline(src_top + row) + src_left * 4; for (int col = 0; col < width; col++) { *dest_scan++ = src_scan[2]; *dest_scan++ = src_scan[1]; @@ -208,9 +206,8 @@ void RgbByteOrderTransferBitmap(const RetainPtr<CFX_DIBitmap>& pBitmap, if (src_format == FXDIB_Rgb) { for (int row = 0; row < height; row++) { uint8_t* dest_scan = dest_buf + row * pitch; - uint8_t* src_scan = - const_cast<uint8_t*>(pSrcBitmap->GetScanline(src_top + row)) + - src_left * 3; + const uint8_t* src_scan = + pSrcBitmap->GetScanline(src_top + row) + src_left * 3; for (int col = 0; col < width; col++) { FXARGB_SETDIB(dest_scan, ArgbEncode(0xff, src_scan[0], src_scan[1], src_scan[2])); @@ -225,9 +222,8 @@ void RgbByteOrderTransferBitmap(const RetainPtr<CFX_DIBitmap>& pBitmap, ASSERT(dest_format == FXDIB_Argb); for (int row = 0; row < height; row++) { uint8_t* dest_scan = dest_buf + row * pitch; - uint8_t* src_scan = - const_cast<uint8_t*>(pSrcBitmap->GetScanline(src_top + row)) + - src_left * 4; + const uint8_t* src_scan = + pSrcBitmap->GetScanline(src_top + row) + src_left * 4; for (int col = 0; col < width; col++) { FXARGB_SETDIB(dest_scan, ArgbEncode(0xff, src_scan[0], src_scan[1], src_scan[2])); |