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

Side by Side Diff: core/fxge/ge/fx_ge_text.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/ge/fx_ge_ps.cpp ('k') | pdfium.gyp » ('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 <limits> 7 #include <limits>
8 8
9 #include "core/fxcodec/include/fx_codec.h" 9 #include "core/fxcodec/include/fx_codec.h"
10 #include "core/fxge/ge/fx_text_int.h" 10 #include "core/fxge/ge/fx_text_int.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 if (!pIccTransform && !FXGETFLAG_COLORTYPE(alpha_flag)) { 151 if (!pIccTransform && !FXGETFLAG_COLORTYPE(alpha_flag)) {
152 argb = color; 152 argb = color;
153 return; 153 return;
154 } 154 }
155 if (!CFX_GEModule::Get()->GetCodecModule() || 155 if (!CFX_GEModule::Get()->GetCodecModule() ||
156 !CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) { 156 !CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) {
157 pIccTransform = NULL; 157 pIccTransform = NULL;
158 } 158 }
159 uint8_t bgra[4]; 159 uint8_t bgra[4];
160 if (pIccTransform) { 160 if (pIccTransform) {
161 ICodec_IccModule* pIccModule = 161 CCodec_IccModule* pIccModule =
162 CFX_GEModule::Get()->GetCodecModule()->GetIccModule(); 162 CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
163 color = FXGETFLAG_COLORTYPE(alpha_flag) ? FXCMYK_TODIB(color) 163 color = FXGETFLAG_COLORTYPE(alpha_flag) ? FXCMYK_TODIB(color)
164 : FXARGB_TODIB(color); 164 : FXARGB_TODIB(color);
165 pIccModule->TranslateScanline(pIccTransform, bgra, (const uint8_t*)&color, 165 pIccModule->TranslateScanline(pIccTransform, bgra, (const uint8_t*)&color,
166 1); 166 1);
167 bgra[3] = FXGETFLAG_COLORTYPE(alpha_flag) 167 bgra[3] = FXGETFLAG_COLORTYPE(alpha_flag)
168 ? (alpha_flag >> 24) ? FXGETFLAG_ALPHA_FILL(alpha_flag) 168 ? (alpha_flag >> 24) ? FXGETFLAG_ALPHA_FILL(alpha_flag)
169 : FXGETFLAG_ALPHA_STROKE(alpha_flag) 169 : FXGETFLAG_ALPHA_STROKE(alpha_flag)
170 : FXARGB_A(color); 170 : FXARGB_A(color);
171 argb = FXARGB_MAKE(bgra[3], bgra[2], bgra[1], bgra[0]); 171 argb = FXARGB_MAKE(bgra[3], bgra[2], bgra[1], bgra[0]);
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 void _CFX_UniqueKeyGen::Generate(int count, ...) { 1907 void _CFX_UniqueKeyGen::Generate(int count, ...) {
1908 va_list argList; 1908 va_list argList;
1909 va_start(argList, count); 1909 va_start(argList, count);
1910 for (int i = 0; i < count; i++) { 1910 for (int i = 0; i < count; i++) {
1911 int p = va_arg(argList, int); 1911 int p = va_arg(argList, int);
1912 ((uint32_t*)m_Key)[i] = p; 1912 ((uint32_t*)m_Key)[i] = p;
1913 } 1913 }
1914 va_end(argList); 1914 va_end(argList);
1915 m_KeyLen = count * sizeof(uint32_t); 1915 m_KeyLen = count * sizeof(uint32_t);
1916 } 1916 }
OLDNEW
« no previous file with comments | « core/fxge/ge/fx_ge_ps.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698