Chromium Code Reviews| Index: cc/output/filter_operation.h |
| diff --git a/cc/output/filter_operation.h b/cc/output/filter_operation.h |
| index d0d768acb281186da448d4b60e2c2ac92c950df6..4e064565f9088b617e0d8e4e3858b4cb9fe3548a 100644 |
| --- a/cc/output/filter_operation.h |
| +++ b/cc/output/filter_operation.h |
| @@ -9,7 +9,6 @@ |
| #include "base/logging.h" |
| #include "cc/base/cc_export.h" |
| -#include "skia/ext/refptr.h" |
| #include "third_party/skia/include/core/SkColor.h" |
| #include "third_party/skia/include/core/SkImageFilter.h" |
| #include "third_party/skia/include/core/SkRegion.h" |
| @@ -77,7 +76,7 @@ class CC_EXPORT FilterOperation { |
| return drop_shadow_color_; |
| } |
| - skia::RefPtr<SkImageFilter> image_filter() const { |
| + sk_sp<SkImageFilter> image_filter() const { |
| DCHECK_EQ(type_, REFERENCE); |
| return image_filter_; |
| } |
| @@ -148,8 +147,8 @@ class CC_EXPORT FilterOperation { |
| } |
| static FilterOperation CreateReferenceFilter( |
| - const skia::RefPtr<SkImageFilter>& image_filter) { |
| - return FilterOperation(REFERENCE, image_filter); |
| + sk_sp<SkImageFilter> image_filter) { |
| + return FilterOperation(REFERENCE, std::move(image_filter)); |
| } |
| static FilterOperation CreateSaturatingBrightnessFilter(float amount) { |
| @@ -197,7 +196,7 @@ class CC_EXPORT FilterOperation { |
| drop_shadow_color_ = color; |
| } |
| - void set_image_filter(const skia::RefPtr<SkImageFilter>& image_filter) { |
| + void set_image_filter(sk_sp<SkImageFilter> image_filter) { |
| DCHECK_EQ(type_, REFERENCE); |
| image_filter_ = image_filter; |
|
f(malita)
2016/04/21 15:45:46
std::move(image_filter)
(now that the params are
tomhudson
2016/04/25 20:20:50
Done.
|
| } |
| @@ -246,8 +245,7 @@ class CC_EXPORT FilterOperation { |
| FilterOperation(FilterType type, float amount, int inset); |
| - FilterOperation(FilterType type, |
| - const skia::RefPtr<SkImageFilter>& image_filter); |
| + FilterOperation(FilterType type, sk_sp<SkImageFilter> image_filter); |
| FilterOperation(FilterType type, |
| const SkRegion& region, |
| @@ -259,7 +257,7 @@ class CC_EXPORT FilterOperation { |
| float outer_threshold_; |
| gfx::Point drop_shadow_offset_; |
| SkColor drop_shadow_color_; |
| - skia::RefPtr<SkImageFilter> image_filter_; |
| + sk_sp<SkImageFilter> image_filter_; |
| SkScalar matrix_[20]; |
| int zoom_inset_; |
| SkRegion region_; |