summaryrefslogtreecommitdiff
path: root/core/fxge/ge
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-22 07:29:08 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-22 07:29:08 -0700
commit726b3db9b05c785923c65a260c59a9a9190c29e0 (patch)
tree9ac0909d9992af059ed4655bc062f46b9205a3c9 /core/fxge/ge
parentca0bc7deead753698af70dced5e619176e37c65a (diff)
downloadpdfium-726b3db9b05c785923c65a260c59a9a9190c29e0.tar.xz
Remove some fx_dib functions with unused parameters.
Review-Url: https://codereview.chromium.org/2075383002
Diffstat (limited to 'core/fxge/ge')
-rw-r--r--core/fxge/ge/fx_ge_text.cpp40
1 files changed, 2 insertions, 38 deletions
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<FXTEXT_GLYPHPOS>& 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;