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

Unified Diff: Source/platform/graphics/GraphicsContextState.cpp

Issue 269283008: Refactor deprecated Skia calls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | « Source/platform/graphics/GraphicsContext.cpp ('k') | Source/web/LinkHighlight.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | Source/web/LinkHighlight.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698