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

Unified Diff: ui/gfx/skbitmap_operations.cc

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: ui/gfx/skbitmap_operations.cc
diff --git a/ui/gfx/skbitmap_operations.cc b/ui/gfx/skbitmap_operations.cc
index 3865916c9032e0b18d062a962e6582cec007f3e1..3b3a7e823f94def6fde65fc469eb1ab65a488b00 100644
--- a/ui/gfx/skbitmap_operations.cc
+++ b/ui/gfx/skbitmap_operations.cc
@@ -704,10 +704,9 @@ SkBitmap SkBitmapOperations::CreateColorMask(const SkBitmap& bitmap,
SkCanvas canvas(color_mask);
- skia::RefPtr<SkColorFilter> color_filter = skia::AdoptRef(
- SkColorFilter::CreateModeFilter(c, SkXfermode::kSrcIn_Mode));
SkPaint paint;
- paint.setColorFilter(color_filter.get());
+ paint.setColorFilter(
+ SkColorFilter::MakeModeFilter(c, SkXfermode::kSrcIn_Mode));
canvas.drawBitmap(bitmap, SkIntToScalar(0), SkIntToScalar(0), &paint);
return color_mask;
}

Powered by Google App Engine
This is Rietveld 408576698