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

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: 2015-11-24 version Created 5 years 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
« no previous file with comments | « core/src/fxcrt/fx_unicode.cpp ('k') | core/src/fxge/ge/fx_ge_font.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "core/include/fxcodec/fx_codec.h" 7 #include "core/include/fxcodec/fx_codec.h"
8 #include "core/include/fxge/fx_dib.h" 8 #include "core/include/fxge/fx_dib.h"
9 #include "core/include/fxge/fx_ge.h" 9 #include "core/include/fxge/fx_ge.h"
10 10
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 } 610 }
611 FX_BOOL _ConvertBuffer_Rgb2PltRgb8(uint8_t* dest_buf, 611 FX_BOOL _ConvertBuffer_Rgb2PltRgb8(uint8_t* dest_buf,
612 int dest_pitch, 612 int dest_pitch,
613 int width, 613 int width,
614 int height, 614 int height,
615 const CFX_DIBSource* pSrcBitmap, 615 const CFX_DIBSource* pSrcBitmap,
616 int src_left, 616 int src_left,
617 int src_top, 617 int src_top,
618 FX_DWORD* dst_plt, 618 FX_DWORD* dst_plt,
619 void* pIccTransform) { 619 void* pIccTransform) {
620 #ifdef PDF_ENABLE_XFA
621 ICodec_IccModule* pIccModule = NULL;
622 if (pIccTransform) {
623 pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
624 }
625 #endif
620 FX_BOOL ret = _ConvertBuffer_Rgb2PltRgb8_NoTransform( 626 FX_BOOL ret = _ConvertBuffer_Rgb2PltRgb8_NoTransform(
621 dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top, 627 dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top,
622 dst_plt); 628 dst_plt);
623 if (ret && pIccTransform) { 629 if (ret && pIccTransform) {
624 ICodec_IccModule* pIccModule = 630 ICodec_IccModule* pIccModule =
625 CFX_GEModule::Get()->GetCodecModule()->GetIccModule(); 631 CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
626 for (int i = 0; i < 256; i++) { 632 for (int i = 0; i < 256; i++) {
627 FX_ARGB* plt = dst_plt + i; 633 FX_ARGB* plt = dst_plt + i;
628 FX_ARGB plt_entry = FXARGB_TODIB(*plt); 634 FX_ARGB plt_entry = FXARGB_TODIB(*plt);
629 pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&plt_entry, 635 pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&plt_entry,
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 if (!m_bExtBuf) { 1224 if (!m_bExtBuf) {
1219 FX_Free(m_pBuffer); 1225 FX_Free(m_pBuffer);
1220 } 1226 }
1221 m_bExtBuf = FALSE; 1227 m_bExtBuf = FALSE;
1222 m_pBuffer = dest_buf; 1228 m_pBuffer = dest_buf;
1223 m_bpp = (uint8_t)dest_format; 1229 m_bpp = (uint8_t)dest_format;
1224 m_AlphaFlag = (uint8_t)(dest_format >> 8); 1230 m_AlphaFlag = (uint8_t)(dest_format >> 8);
1225 m_Pitch = dest_pitch; 1231 m_Pitch = dest_pitch;
1226 return TRUE; 1232 return TRUE;
1227 } 1233 }
OLDNEW
« no previous file with comments | « core/src/fxcrt/fx_unicode.cpp ('k') | core/src/fxge/ge/fx_ge_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698