diff options
author | Nicolas Pena <npm@chromium.org> | 2017-05-08 15:08:12 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-08 19:50:11 +0000 |
commit | 615bb96eb26570fd87004e2fa6f42eca0dbf79cd (patch) | |
tree | a2e2ece53fcaa41c5670ac7e7afd706373f2078f /core/fxge/win32 | |
parent | 852fb12d554abbbda65bbbf3720117a0aad5a9c9 (diff) | |
download | pdfium-615bb96eb26570fd87004e2fa6f42eca0dbf79cd.tar.xz |
Remove default params in CFX_DIBSource
Change-Id: I9306afed2747e3b0054adeea1d39916cac47f5c5
Reviewed-on: https://pdfium-review.googlesource.com/5091
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/win32')
-rw-r--r-- | core/fxge/win32/fx_win32_device.cpp | 2 | ||||
-rw-r--r-- | core/fxge/win32/fx_win32_dib.cpp | 10 | ||||
-rw-r--r-- | core/fxge/win32/fx_win32_gdipext.cpp | 5 |
3 files changed, 7 insertions, 10 deletions
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index c67ed526d3..6e960f95b4 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -852,7 +852,7 @@ bool CGdiDeviceDriver::GDI_StretchDIBits( if (m_DeviceClass == FXDC_PRINTER && ((int64_t)pBitmap->GetWidth() * pBitmap->GetHeight() > (int64_t)abs(dest_width) * abs(dest_height))) { - pToStrechBitmap = pBitmap->StretchTo(dest_width, dest_height); + pToStrechBitmap = pBitmap->StretchTo(dest_width, dest_height, 0, nullptr); } CFX_ByteString toStrechBitmapInfo = CFX_WindowsDIB::GetBitmapInfo(pToStrechBitmap); diff --git a/core/fxge/win32/fx_win32_dib.cpp b/core/fxge/win32/fx_win32_dib.cpp index 677fb3ab80..d1e5688ee1 100644 --- a/core/fxge/win32/fx_win32_dib.cpp +++ b/core/fxge/win32/fx_win32_dib.cpp @@ -86,13 +86,11 @@ CFX_RetainPtr<CFX_DIBitmap> _FX_WindowsDIB_LoadFromBuf(BITMAPINFO* pbmi, temp_buf = nullptr; } if (pbmi->bmiHeader.biBitCount == 1) { - for (int i = 0; i < 2; i++) { - pBitmap->SetPaletteEntry(i, ((uint32_t*)pbmi->bmiColors)[i] | 0xff000000); - } + for (int i = 0; i < 2; i++) + pBitmap->SetPaletteArgb(i, ((uint32_t*)pbmi->bmiColors)[i] | 0xff000000); } else if (pbmi->bmiHeader.biBitCount == 8) { - for (int i = 0; i < 256; i++) { - pBitmap->SetPaletteEntry(i, ((uint32_t*)pbmi->bmiColors)[i] | 0xff000000); - } + for (int i = 0; i < 256; i++) + pBitmap->SetPaletteArgb(i, ((uint32_t*)pbmi->bmiColors)[i] | 0xff000000); } return pBitmap; } diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp index 87172ffff8..d718dc8abf 100644 --- a/core/fxge/win32/fx_win32_gdipext.cpp +++ b/core/fxge/win32/fx_win32_gdipext.cpp @@ -647,9 +647,8 @@ static void OutputImage(GpGraphics* pGraphics, UINT pal[258]; pal[0] = 0; pal[1] = 256; - for (int i = 0; i < 256; i++) { - pal[i + 2] = pBitmap->GetPaletteEntry(i); - } + for (int i = 0; i < 256; i++) + pal[i + 2] = pBitmap->GetPaletteArgb(i); CallFunc(GdipSetImagePalette)(bitmap, (ColorPalette*)pal); break; } |