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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp

Issue 1829093002: Use sk_sp-based APIs for SkColorFilter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to reviews Created 4 years, 9 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
Index: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
index b6535bbb72a563b31c4a8484e8f097c1f64cadba..2c37a52e04261ab2f7c76ac640bfbe4de60f8c40 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
@@ -268,7 +268,7 @@ void GraphicsContext::beginLayer(float opacity, SkXfermode::Mode xfermode, const
SkPaint layerPaint;
layerPaint.setAlpha(static_cast<unsigned char>(opacity * 255));
layerPaint.setXfermodeMode(xfermode);
- layerPaint.setColorFilter(WebCoreColorFilterToSkiaColorFilter(colorFilter).get());
+ layerPaint.setColorFilter(toSkSp(WebCoreColorFilterToSkiaColorFilter(colorFilter)));
layerPaint.setImageFilter(imageFilter);
if (bounds) {
@@ -1258,7 +1258,7 @@ PassRefPtr<SkColorFilter> GraphicsContext::WebCoreColorFilterToSkiaColorFilter(C
{
switch (colorFilter) {
case ColorFilterLuminanceToAlpha:
- return adoptRef(SkLumaColorFilter::Create());
+ return fromSkSp(SkLumaColorFilter::Make());
case ColorFilterLinearRGBToSRGB:
return ColorSpaceUtilities::createColorSpaceFilter(ColorSpaceLinearRGB, ColorSpaceDeviceRGB);
case ColorFilterSRGBToLinearRGB:

Powered by Google App Engine
This is Rietveld 408576698