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

Side by Side Diff: core/fxge/dib/fx_dib_main.cpp

Issue 1876023003: Remove ICodec_* Interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « core/fxge/dib/fx_dib_convert.cpp ('k') | core/fxge/ge/fx_ge_ps.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/fxge/include/fx_dib.h" 7 #include "core/fxge/include/fx_dib.h"
8 8
9 #include <limits.h> 9 #include <limits.h>
10 10
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 if (alpha_flag >> 8) { 483 if (alpha_flag >> 8) {
484 alpha = alpha_flag & 0xff; 484 alpha = alpha_flag & 0xff;
485 dst_color = FXCMYK_TODIB(color); 485 dst_color = FXCMYK_TODIB(color);
486 } else { 486 } else {
487 alpha = FXARGB_A(color); 487 alpha = FXARGB_A(color);
488 dst_color = FXARGB_TODIB(color); 488 dst_color = FXARGB_TODIB(color);
489 } 489 }
490 uint8_t* color_p = (uint8_t*)&dst_color; 490 uint8_t* color_p = (uint8_t*)&dst_color;
491 if (pIccTransform && CFX_GEModule::Get()->GetCodecModule() && 491 if (pIccTransform && CFX_GEModule::Get()->GetCodecModule() &&
492 CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) { 492 CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) {
493 ICodec_IccModule* pIccModule = 493 CCodec_IccModule* pIccModule =
494 CFX_GEModule::Get()->GetCodecModule()->GetIccModule(); 494 CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
495 pIccModule->TranslateScanline(pIccTransform, color_p, color_p, 1); 495 pIccModule->TranslateScanline(pIccTransform, color_p, color_p, 1);
496 } else { 496 } else {
497 if (alpha_flag >> 8 && !IsCmykImage()) { 497 if (alpha_flag >> 8 && !IsCmykImage()) {
498 AdobeCMYK_to_sRGB1(FXSYS_GetCValue(color), FXSYS_GetMValue(color), 498 AdobeCMYK_to_sRGB1(FXSYS_GetCValue(color), FXSYS_GetMValue(color),
499 FXSYS_GetYValue(color), FXSYS_GetKValue(color), 499 FXSYS_GetYValue(color), FXSYS_GetKValue(color),
500 color_p[2], color_p[1], color_p[0]); 500 color_p[2], color_p[1], color_p[0]);
501 } else if (!(alpha_flag >> 8) && IsCmykImage()) { 501 } else if (!(alpha_flag >> 8) && IsCmykImage()) {
502 return FALSE; 502 return FALSE;
503 } 503 }
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 if (!m_pBitmap->Create(width, height, src_format)) { 1753 if (!m_pBitmap->Create(width, height, src_format)) {
1754 delete m_pBitmap; 1754 delete m_pBitmap;
1755 m_pBitmap = NULL; 1755 m_pBitmap = NULL;
1756 return FALSE; 1756 return FALSE;
1757 } 1757 }
1758 if (pSrcPalette) { 1758 if (pSrcPalette) {
1759 m_pBitmap->CopyPalette(pSrcPalette); 1759 m_pBitmap->CopyPalette(pSrcPalette);
1760 } 1760 }
1761 return TRUE; 1761 return TRUE;
1762 } 1762 }
OLDNEW
« no previous file with comments | « core/fxge/dib/fx_dib_convert.cpp ('k') | core/fxge/ge/fx_ge_ps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698