diff --git a/gfx/thebes/gfxContext.cpp b/gfx/thebes/gfxContext.cpp index 67517a698a28..96461358169f 100644 --- a/gfx/thebes/gfxContext.cpp +++ b/gfx/thebes/gfxContext.cpp @@ -751,19 +751,6 @@ gfxContext::GetPattern() return pat.forget(); } -void -gfxContext::SetFontSmoothingBackgroundColor(const Color& aColor) -{ - CURRENTSTATE_CHANGED() - CurrentState().fontSmoothingBackgroundColor = aColor; -} - -Color -gfxContext::GetFontSmoothingBackgroundColor() -{ - return CurrentState().fontSmoothingBackgroundColor; -} - // masking void gfxContext::Mask(SourceSurface* aSurface, Float aAlpha, const Matrix& aTransform) diff --git a/gfx/thebes/gfxContext.h b/gfx/thebes/gfxContext.h index 2ac7ce87d676..f554a4e8ff83 100644 --- a/gfx/thebes/gfxContext.h +++ b/gfx/thebes/gfxContext.h @@ -281,13 +281,6 @@ public: */ void SetPattern(gfxPattern *pattern); - /** - * Set the color that text drawn on top of transparent pixels should be - * anti-aliased into. - */ - void SetFontSmoothingBackgroundColor(const mozilla::gfx::Color& aColor); - mozilla::gfx::Color GetFontSmoothingBackgroundColor(); - /** * Get the source pattern (solid color, normal pattern, surface, etc) */ diff --git a/gfx/thebes/gfxFont.h b/gfx/thebes/gfxFont.h index b06ab56d0a5c..07d2c15fe17d 100644 --- a/gfx/thebes/gfxFont.h +++ b/gfx/thebes/gfxFont.h @@ -2298,7 +2298,6 @@ struct MOZ_STACK_CLASS TextRunDrawParams { gfxFont::Spacing *spacing; gfxTextRunDrawCallbacks *callbacks; mozilla::SVGContextPaint *runContextPaint; - mozilla::gfx::Color fontSmoothingBGColor; mozilla::gfx::Float direction; double devPerApp; nscolor textStrokeColor; diff --git a/gfx/thebes/gfxTextRun.cpp b/gfx/thebes/gfxTextRun.cpp index 4a1d8ed0f0f3..d52f77017345 100644 --- a/gfx/thebes/gfxTextRun.cpp +++ b/gfx/thebes/gfxTextRun.cpp @@ -679,8 +679,6 @@ gfxTextRun::Draw(Range aRange, gfx::Point aPt, const DrawParams& aParams) const params.paintSVGGlyphs = !aParams.callbacks || aParams.callbacks->mShouldPaintSVGGlyphs; params.dt = aParams.context->GetDrawTarget(); - params.fontSmoothingBGColor = - aParams.context->GetFontSmoothingBackgroundColor(); GlyphRunIterator iter(this, aRange); gfxFloat advance = 0.0; diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 053ce3513f4e..b00c7ab45904 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -7092,10 +7092,7 @@ nsTextFrame::PaintText(const PaintTextParams& aParams, params.drawSoftHyphen = (GetStateBits() & TEXT_HYPHEN_BREAK) != 0; params.contextPaint = aParams.contextPaint; params.callbacks = aParams.callbacks; - aParams.context->SetFontSmoothingBackgroundColor( - Color::FromABGR(StyleFont()->mFont.fontSmoothingBackgroundColor)); DrawText(range, textBaselinePt, params); - aParams.context->SetFontSmoothingBackgroundColor(Color()); } static void diff --git a/layout/xul/nsTextBoxFrame.cpp b/layout/xul/nsTextBoxFrame.cpp index 93334540054d..bea04014d310 100644 --- a/layout/xul/nsTextBoxFrame.cpp +++ b/layout/xul/nsTextBoxFrame.cpp @@ -526,8 +526,6 @@ nsTextBoxFrame::DrawText(gfxContext& aRenderingContext, nscolor c = aOverrideColor ? *aOverrideColor : StyleColor()->mColor; ColorPattern color(ToDeviceColor(c)); aRenderingContext.SetColor(Color::FromABGR(c)); - aRenderingContext.SetFontSmoothingBackgroundColor( - Color::FromABGR(StyleFont()->mFont.fontSmoothingBackgroundColor)); nsresult rv = NS_ERROR_FAILURE; @@ -599,8 +597,6 @@ nsTextBoxFrame::DrawText(gfxContext& aRenderingContext, params.style = strikeStyle; nsCSSRendering::PaintDecorationLine(this, *drawTarget, params); } - - aRenderingContext.SetFontSmoothingBackgroundColor(Color()); } void diff --git a/layout/xul/tree/nsTreeBodyFrame.cpp b/layout/xul/tree/nsTreeBodyFrame.cpp index 51b2c8c874e9..096a5514f59a 100644 --- a/layout/xul/tree/nsTreeBodyFrame.cpp +++ b/layout/xul/tree/nsTreeBodyFrame.cpp @@ -3061,10 +3061,6 @@ nsTreeBodyFrame::PaintRow(int32_t aRowIndex, theme = aPresContext->GetTheme(); } - // Save the current font smoothing background color in case we change it. - Color originalColor(aRenderingContext.GetFontSmoothingBackgroundColor()); - aRenderingContext.SetFontSmoothingBackgroundColor( - ToDeviceColor(rowContext->StyleFont()->mFont.fontSmoothingBackgroundColor)); if (theme && theme->ThemeSupportsWidget(aPresContext, nullptr, appearance)) { nsRect dirty; dirty.IntersectRect(rowRect, aDirtyRect); @@ -3174,11 +3170,6 @@ nsTreeBodyFrame::PaintRow(int32_t aRowIndex, } } } - // If we've changed the font smoothing background color for this row, restore - // the color to the original one. - if (originalColor != aRenderingContext.GetFontSmoothingBackgroundColor()) { - aRenderingContext.SetFontSmoothingBackgroundColor(originalColor); - } return result; }