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

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

Issue 269283008: Refactor deprecated Skia calls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: SkiaUtils InterpolationQuality helper. 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/platform/graphics/skia/SkiaUtils.h » ('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..740dcd74e9f18e3f30fca3415950c6390c9c0aef 100644
--- a/Source/platform/graphics/GraphicsContextState.cpp
+++ b/Source/platform/graphics/GraphicsContextState.cpp
@@ -5,6 +5,8 @@
#include "config.h"
#include "platform/graphics/GraphicsContextState.h"
+#include "platform/graphics/skia/SkiaUtils.h"
+
namespace WebCore {
GraphicsContextState::GraphicsContextState()
@@ -27,10 +29,10 @@ 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(WebCoreInterpolationQualityToSkFilterLevel(m_interpolationQuality));
m_strokePaint.setAntiAlias(m_shouldAntialias);
m_fillPaint.setColor(applyAlpha(m_fillColor.rgb()));
- m_fillPaint.setFilterBitmap(m_interpolationQuality != InterpolationNone);
+ m_fillPaint.setFilterLevel(WebCoreInterpolationQualityToSkFilterLevel(m_interpolationQuality));
m_fillPaint.setAntiAlias(m_shouldAntialias);
}
@@ -235,8 +237,8 @@ void GraphicsContextState::setCompositeOperation(CompositeOperator compositeOper
void GraphicsContextState::setInterpolationQuality(InterpolationQuality quality)
{
m_interpolationQuality = quality;
- m_strokePaint.setFilterBitmap(quality != InterpolationNone);
- m_fillPaint.setFilterBitmap(quality != InterpolationNone);
+ m_strokePaint.setFilterLevel(WebCoreInterpolationQualityToSkFilterLevel(quality));
+ m_fillPaint.setFilterLevel(WebCoreInterpolationQualityToSkFilterLevel(quality));
}
void GraphicsContextState::setShouldAntialias(bool shouldAntialias)
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | Source/platform/graphics/skia/SkiaUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698