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

Unified Diff: cc/output/filter_operation.h

Issue 1869753003: Replace many skia::RefPtr with sk_sp<> in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review 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 | « cc/layers/picture_layer_unittest.cc ('k') | cc/output/filter_operation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/filter_operation.h
diff --git a/cc/output/filter_operation.h b/cc/output/filter_operation.h
index d0d768acb281186da448d4b60e2c2ac92c950df6..7211ffd541b3c93e2fe689156e1fd929847047fd 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);
+ const sk_sp<SkImageFilter> image_filter) {
fmalita_google_do_not_use 2016/04/16 15:48:42 When pass-by-val, the param should be non-const -
tomhudson 2016/04/25 20:20:50 Done.
+ 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(const sk_sp<SkImageFilter> image_filter) {
DCHECK_EQ(type_, REFERENCE);
image_filter_ = image_filter;
}
@@ -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, const 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_;
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/output/filter_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698