From 726b3db9b05c785923c65a260c59a9a9190c29e0 Mon Sep 17 00:00:00 2001 From: thestig Date: Wed, 22 Jun 2016 07:29:08 -0700 Subject: Remove some fx_dib functions with unused parameters. Review-Url: https://codereview.chromium.org/2075383002 --- core/fxge/ge/fx_ge_text.cpp | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) (limited to '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 f09e44eefb..1a0c14e0db 100644 --- a/core/fxge/ge/fx_ge_text.cpp +++ b/core/fxge/ge/fx_ge_text.cpp @@ -365,41 +365,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& glyphs, int anti_alias, FX_FLOAT retinaScaleX, @@ -613,10 +578,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; -- cgit v1.2.3