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

Unified Diff: core/fxge/ge/fx_ge_text.cpp

Issue 2075383002: Remove some fx_dib functions with unused parameters. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix build, fix skia Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxge/dib/fx_dib_main.cpp ('k') | core/fxge/include/fx_dib.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/ge/fx_ge_text.cpp
diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp
index cf349eb9c07103674ff81e24aadedcb7574d2132..59265078c72aca399efc3d8e7cc66847e504ef20 100644
--- a/core/fxge/ge/fx_ge_text.cpp
+++ b/core/fxge/ge/fx_ge_text.cpp
@@ -364,41 +364,6 @@ bool ShouldDrawDeviceText(const CFX_Font* pFont, uint32_t text_flags) {
} // namespace
-void Color2Argb(FX_ARGB& argb,
- uint32_t color,
- int alpha_flag,
- void* pIccTransform) {
- if (!pIccTransform && !FXGETFLAG_COLORTYPE(alpha_flag)) {
- argb = color;
- return;
- }
- if (!CFX_GEModule::Get()->GetCodecModule() ||
- !CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) {
- pIccTransform = nullptr;
- }
- uint8_t bgra[4];
- if (pIccTransform) {
- CCodec_IccModule* pIccModule =
- CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
- color = FXGETFLAG_COLORTYPE(alpha_flag) ? FXCMYK_TODIB(color)
- : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, bgra, (const uint8_t*)&color,
- 1);
- bgra[3] = FXGETFLAG_COLORTYPE(alpha_flag)
- ? (alpha_flag >> 24) ? FXGETFLAG_ALPHA_FILL(alpha_flag)
- : FXGETFLAG_ALPHA_STROKE(alpha_flag)
- : FXARGB_A(color);
- argb = FXARGB_MAKE(bgra[3], bgra[2], bgra[1], bgra[0]);
- return;
- }
- AdobeCMYK_to_sRGB1(FXSYS_GetCValue(color), FXSYS_GetMValue(color),
- FXSYS_GetYValue(color), FXSYS_GetKValue(color), bgra[2],
- bgra[1], bgra[0]);
- bgra[3] = (alpha_flag >> 24) ? FXGETFLAG_ALPHA_FILL(alpha_flag)
- : FXGETFLAG_ALPHA_STROKE(alpha_flag);
- argb = FXARGB_MAKE(bgra[3], bgra[2], bgra[1], bgra[0]);
-}
-
FX_RECT FXGE_GetGlyphsBBox(const std::vector<FXTEXT_GLYPHPOS>& glyphs,
int anti_alias,
FX_FLOAT retinaScaleX,
@@ -612,10 +577,9 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars,
int r = 0;
int g = 0;
int b = 0;
- if (anti_alias == FXFT_RENDER_MODE_LCD) {
- Color2Argb(fill_color, fill_color, (1 << 24), nullptr);
+ if (anti_alias == FXFT_RENDER_MODE_LCD)
ArgbDecode(fill_color, a, r, g, b);
- }
+
for (const FXTEXT_GLYPHPOS& glyph : glyphs) {
if (!glyph.m_pGlyph)
continue;
« no previous file with comments | « core/fxge/dib/fx_dib_main.cpp ('k') | core/fxge/include/fx_dib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698