Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2285)

Unified Diff: core/fxge/skia/fx_skia_device.cpp

Issue 2017503002: Remove FX_GAMMA() and friends. They do nothing. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Blend Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxge/include/fx_ge.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 3d08cb5fe1f624be02b7c6cb5b1f95f1c7cca387..6646eedd0fb7328cc4b2f6bd5c2eca366b2dc3ab 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) {
« no previous file with comments | « core/fxge/include/fx_ge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698