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

Side by Side Diff: core/src/fxge/dib/fx_dib_convert.cpp

Issue 1398383002: core/ difference with XFA (for information only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: After bidi Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../../include/fxge/fx_dib.h" 7 #include "../../../include/fxge/fx_dib.h"
8 #include "../../../include/fxge/fx_ge.h" 8 #include "../../../include/fxge/fx_ge.h"
9 #include "../../../include/fxcodec/fx_codec.h" 9 #include "../../../include/fxcodec/fx_codec.h"
10 const FX_DWORD g_dwWinPalette[256] = { 10 const FX_DWORD g_dwWinPalette[256] = {
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 } 609 }
610 FX_BOOL _ConvertBuffer_Rgb2PltRgb8(uint8_t* dest_buf, 610 FX_BOOL _ConvertBuffer_Rgb2PltRgb8(uint8_t* dest_buf,
611 int dest_pitch, 611 int dest_pitch,
612 int width, 612 int width,
613 int height, 613 int height,
614 const CFX_DIBSource* pSrcBitmap, 614 const CFX_DIBSource* pSrcBitmap,
615 int src_left, 615 int src_left,
616 int src_top, 616 int src_top,
617 FX_DWORD* dst_plt, 617 FX_DWORD* dst_plt,
618 void* pIccTransform) { 618 void* pIccTransform) {
619 #ifdef PDF_ENABLE_XFA
620 ICodec_IccModule* pIccModule = NULL;
621 if (pIccTransform) {
622 pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
623 }
624 #endif
619 FX_BOOL ret = _ConvertBuffer_Rgb2PltRgb8_NoTransform( 625 FX_BOOL ret = _ConvertBuffer_Rgb2PltRgb8_NoTransform(
620 dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top, 626 dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top,
621 dst_plt); 627 dst_plt);
622 if (ret && pIccTransform) { 628 if (ret && pIccTransform) {
623 ICodec_IccModule* pIccModule = 629 ICodec_IccModule* pIccModule =
624 CFX_GEModule::Get()->GetCodecModule()->GetIccModule(); 630 CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
625 for (int i = 0; i < 256; i++) { 631 for (int i = 0; i < 256; i++) {
626 FX_ARGB* plt = dst_plt + i; 632 FX_ARGB* plt = dst_plt + i;
627 FX_ARGB plt_entry = FXARGB_TODIB(*plt); 633 FX_ARGB plt_entry = FXARGB_TODIB(*plt);
628 pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&plt_entry, 634 pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&plt_entry,
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 if (!m_bExtBuf) { 1223 if (!m_bExtBuf) {
1218 FX_Free(m_pBuffer); 1224 FX_Free(m_pBuffer);
1219 } 1225 }
1220 m_bExtBuf = FALSE; 1226 m_bExtBuf = FALSE;
1221 m_pBuffer = dest_buf; 1227 m_pBuffer = dest_buf;
1222 m_bpp = (uint8_t)dest_format; 1228 m_bpp = (uint8_t)dest_format;
1223 m_AlphaFlag = (uint8_t)(dest_format >> 8); 1229 m_AlphaFlag = (uint8_t)(dest_format >> 8);
1224 m_Pitch = dest_pitch; 1230 m_Pitch = dest_pitch;
1225 return TRUE; 1231 return TRUE;
1226 } 1232 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698