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

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
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/fxcodec/include/fx_codec.h" 7 #include "core/fxcodec/include/fx_codec.h"
8 #include "core/fxge/ge/fx_text_int.h" 8 #include "core/fxge/ge/fx_text_int.h"
9 #include "core/fxge/include/fx_freetype.h" 9 #include "core/fxge/include/fx_freetype.h"
10 #include "core/fxge/include/fx_ge.h" 10 #include "core/fxge/include/fx_ge.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (!pIccTransform && !FXGETFLAG_COLORTYPE(alpha_flag)) { 149 if (!pIccTransform && !FXGETFLAG_COLORTYPE(alpha_flag)) {
150 argb = color; 150 argb = color;
151 return; 151 return;
152 } 152 }
153 if (!CFX_GEModule::Get()->GetCodecModule() || 153 if (!CFX_GEModule::Get()->GetCodecModule() ||
154 !CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) { 154 !CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) {
155 pIccTransform = NULL; 155 pIccTransform = NULL;
156 } 156 }
157 uint8_t bgra[4]; 157 uint8_t bgra[4];
158 if (pIccTransform) { 158 if (pIccTransform) {
159 ICodec_IccModule* pIccModule = 159 CCodec_IccModule* pIccModule =
160 CFX_GEModule::Get()->GetCodecModule()->GetIccModule(); 160 CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
161 color = FXGETFLAG_COLORTYPE(alpha_flag) ? FXCMYK_TODIB(color) 161 color = FXGETFLAG_COLORTYPE(alpha_flag) ? FXCMYK_TODIB(color)
162 : FXARGB_TODIB(color); 162 : FXARGB_TODIB(color);
163 pIccModule->TranslateScanline(pIccTransform, bgra, (const uint8_t*)&color, 163 pIccModule->TranslateScanline(pIccTransform, bgra, (const uint8_t*)&color,
164 1); 164 1);
165 bgra[3] = FXGETFLAG_COLORTYPE(alpha_flag) 165 bgra[3] = FXGETFLAG_COLORTYPE(alpha_flag)
166 ? (alpha_flag >> 24) ? FXGETFLAG_ALPHA_FILL(alpha_flag) 166 ? (alpha_flag >> 24) ? FXGETFLAG_ALPHA_FILL(alpha_flag)
167 : FXGETFLAG_ALPHA_STROKE(alpha_flag) 167 : FXGETFLAG_ALPHA_STROKE(alpha_flag)
168 : FXARGB_A(color); 168 : FXARGB_A(color);
169 argb = FXARGB_MAKE(bgra[3], bgra[2], bgra[1], bgra[0]); 169 argb = FXARGB_MAKE(bgra[3], bgra[2], bgra[1], bgra[0]);
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1897 void _CFX_UniqueKeyGen::Generate(int count, ...) { 1897 void _CFX_UniqueKeyGen::Generate(int count, ...) {
1898 va_list argList; 1898 va_list argList;
1899 va_start(argList, count); 1899 va_start(argList, count);
1900 for (int i = 0; i < count; i++) { 1900 for (int i = 0; i < count; i++) {
1901 int p = va_arg(argList, int); 1901 int p = va_arg(argList, int);
1902 ((uint32_t*)m_Key)[i] = p; 1902 ((uint32_t*)m_Key)[i] = p;
1903 } 1903 }
1904 va_end(argList); 1904 va_end(argList);
1905 m_KeyLen = count * sizeof(uint32_t); 1905 m_KeyLen = count * sizeof(uint32_t);
1906 } 1906 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698