From 008ec70b47db2318a98e8474b7bfac6e10b2bc6c Mon Sep 17 00:00:00 2001 From: thestig Date: Wed, 25 May 2016 19:07:08 -0700 Subject: Remove FX_GAMMA() and friends. They do nothing. Review-Url: https://codereview.chromium.org/2017503002 --- core/fxge/skia/fx_skia_device.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'core/fxge/skia/fx_skia_device.cpp') diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index 3d08cb5fe1..6646eedd0f 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -259,7 +259,7 @@ void RgbByteOrderTransferBitmap(CFX_DIBitmap* pBitmap, return; pBitmap->GetOverlapRect(dest_left, dest_top, width, height, pSrcBitmap->GetWidth(), pSrcBitmap->GetHeight(), - src_left, src_top, NULL); + src_left, src_top, nullptr); if (width == 0 || height == 0) return; int Bpp = pBitmap->GetBPP() / 8; @@ -313,21 +313,11 @@ void RgbByteOrderTransferBitmap(CFX_DIBitmap* pBitmap, uint8_t* dest_scan = (uint8_t*)(dest_buf + row * pitch); uint8_t* src_scan = (uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left * 3; - if (src_format == FXDIB_Argb) { - for (int col = 0; col < width; col++) { - FXARGB_SETDIB(dest_scan, FXARGB_MAKE(0xff, FX_GAMMA(src_scan[0]), - FX_GAMMA(src_scan[1]), - FX_GAMMA(src_scan[2]))); - dest_scan += 4; - src_scan += 3; - } - } else { - for (int col = 0; col < width; col++) { - FXARGB_SETDIB(dest_scan, FXARGB_MAKE(0xff, src_scan[0], src_scan[1], - src_scan[2])); - dest_scan += 4; - src_scan += 3; - } + for (int col = 0; col < width; col++) { + FXARGB_SETDIB(dest_scan, FXARGB_MAKE(0xff, src_scan[0], src_scan[1], + src_scan[2])); + dest_scan += 4; + src_scan += 3; } } } else if (src_format == FXDIB_Rgb32) { -- cgit v1.2.3