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

Unified Diff: gm/imagefilterscropped.cpp

Issue 1858813002: Update SkColorFilterImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 8 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 | « gm/imagefilterscropexpand.cpp ('k') | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefilterscropped.cpp
diff --git a/gm/imagefilterscropped.cpp b/gm/imagefilterscropped.cpp
index 66e4d870e9eea9263d7d599dde1c4ec1a01af0f2..0c04e52b4899b1bdad7d13910864abc9760303ac 100644
--- a/gm/imagefilterscropped.cpp
+++ b/gm/imagefilterscropped.cpp
@@ -106,11 +106,11 @@ protected:
canvas->drawRect(r, paint);
}
- virtual void onOnceBeforeDraw() override{
+ void onOnceBeforeDraw() override{
make_checkerboard();
}
- virtual void onDraw(SkCanvas* canvas) override {
+ void onDraw(SkCanvas* canvas) override {
void (*drawProc[])(SkCanvas*, const SkRect&, sk_sp<SkImageFilter>) = {
draw_bitmap, draw_path, draw_paint, draw_text
};
@@ -126,14 +126,14 @@ protected:
SkIntToScalar(-10),
nullptr));
- sk_sp<SkImageFilter> cfOffset(SkColorFilterImageFilter::Create(cf.get(), offset.get()));
+ sk_sp<SkImageFilter> cfOffset(SkColorFilterImageFilter::Make(cf, std::move(offset)));
sk_sp<SkImageFilter> erodeX(SkErodeImageFilter::Make(8, 0, nullptr, &cropRect));
sk_sp<SkImageFilter> erodeY(SkErodeImageFilter::Make(0, 8, nullptr, &cropRect));
sk_sp<SkImageFilter> filters[] = {
nullptr,
- sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cf.get(), nullptr, &cropRect)),
+ SkColorFilterImageFilter::Make(cf, nullptr, &cropRect),
SkBlurImageFilter::Make(0.0f, 0.0f, nullptr, &cropRect),
SkBlurImageFilter::Make(1.0f, 1.0f, nullptr, &cropRect),
SkBlurImageFilter::Make(8.0f, 0.0f, nullptr, &cropRect),
@@ -148,7 +148,7 @@ protected:
SkXfermode::kSrcOver_Mode,
&cropRect),
SkBlurImageFilter::Make(8.0f, 8.0f, nullptr, &bogusRect),
- sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cf.get(), nullptr, &bogusRect)),
+ SkColorFilterImageFilter::Make(cf, nullptr, &bogusRect),
};
SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64));
« no previous file with comments | « gm/imagefilterscropexpand.cpp ('k') | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698