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

Unified Diff: Source/platform/graphics/skia/SkiaUtils.h

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/GraphicsContextState.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/skia/SkiaUtils.h
diff --git a/Source/platform/graphics/skia/SkiaUtils.h b/Source/platform/graphics/skia/SkiaUtils.h
index db4c47db18709eeb7e229729aae47c4230221ab0..0b4082b7953732595e049cc7ae526a0c514685ca 100644
--- a/Source/platform/graphics/skia/SkiaUtils.h
+++ b/Source/platform/graphics/skia/SkiaUtils.h
@@ -34,6 +34,7 @@
#define SkiaUtils_h
#include "SkMatrix.h"
+#include "SkPaint.h"
#include "SkPath.h"
#include "SkXfermode.h"
#include "platform/PlatformExport.h"
@@ -56,6 +57,13 @@ PassRefPtr<SkXfermode> WebCoreCompositeToSkiaComposite(CompositeOperator, blink:
// move this guy into SkColor.h
SkColor SkPMColorToColor(SkPMColor);
+inline SkPaint::FilterLevel WebCoreInterpolationQualityToSkFilterLevel(InterpolationQuality quality)
+{
+ // FIXME: this reflects existing client mappings, but should probably
+ // be expanded to map higher level interpolations more accurately.
+ return quality != InterpolationNone ? SkPaint::kLow_FilterLevel : SkPaint::kNone_FilterLevel;
+}
+
// Skia has problems when passed infinite, etc floats, filter them to 0.
inline SkScalar WebCoreFloatToSkScalar(float f)
{
« no previous file with comments | « Source/platform/graphics/GraphicsContextState.cpp ('k') | Source/web/LinkHighlight.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698