Chromium Code Reviews| Index: Source/platform/graphics/GraphicsContextState.cpp |
| diff --git a/Source/platform/graphics/GraphicsContextState.cpp b/Source/platform/graphics/GraphicsContextState.cpp |
| index abd3c18b857957a6a1516bf2552a880d9ca87506..9f646436e87f3ce1265d4f496111a3e117fb078b 100644 |
| --- a/Source/platform/graphics/GraphicsContextState.cpp |
| +++ b/Source/platform/graphics/GraphicsContextState.cpp |
| @@ -27,10 +27,12 @@ GraphicsContextState::GraphicsContextState() |
| m_strokePaint.setStrokeCap(SkPaint::kDefault_Cap); |
| m_strokePaint.setStrokeJoin(SkPaint::kDefault_Join); |
| m_strokePaint.setStrokeMiter(SkFloatToScalar(m_strokeData.miterLimit())); |
| - m_strokePaint.setFilterBitmap(m_interpolationQuality != InterpolationNone); |
| + m_strokePaint.setFilterLevel(m_interpolationQuality != InterpolationNone |
| + ? SkPaint::kLow_FilterLevel : SkPaint::kNone_FilterLevel); |
| m_strokePaint.setAntiAlias(m_shouldAntialias); |
| m_fillPaint.setColor(applyAlpha(m_fillColor.rgb())); |
| - m_fillPaint.setFilterBitmap(m_interpolationQuality != InterpolationNone); |
| + m_fillPaint.setFilterLevel(m_interpolationQuality != InterpolationNone |
|
Stephen White
2014/05/07 16:40:47
Nit: maybe we should have an inline function to do
f(malita)
2014/05/07 17:53:26
Done.
|
| + ? SkPaint::kLow_FilterLevel : SkPaint::kNone_FilterLevel); |
| m_fillPaint.setAntiAlias(m_shouldAntialias); |
| } |
| @@ -235,8 +237,10 @@ void GraphicsContextState::setCompositeOperation(CompositeOperator compositeOper |
| void GraphicsContextState::setInterpolationQuality(InterpolationQuality quality) |
| { |
| m_interpolationQuality = quality; |
| - m_strokePaint.setFilterBitmap(quality != InterpolationNone); |
| - m_fillPaint.setFilterBitmap(quality != InterpolationNone); |
| + SkPaint::FilterLevel filterLevel = quality != InterpolationNone ? |
| + SkPaint::kLow_FilterLevel : SkPaint::kNone_FilterLevel; |
| + m_strokePaint.setFilterLevel(filterLevel); |
| + m_fillPaint.setFilterLevel(filterLevel); |
| } |
| void GraphicsContextState::setShouldAntialias(bool shouldAntialias) |