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

Unified Diff: cc/output/filter_operation.cc

Issue 2042413003: Implement cc::FilterOperation StructTraits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase against master for bots Created 4 years, 6 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: cc/output/filter_operation.cc
diff --git a/cc/output/filter_operation.cc b/cc/output/filter_operation.cc
index 78588748ba59d63c5d68bd35e1df56cba76f0d22..c98990fc6198950a7b6c8324f47ccfeba3d412a6 100644
--- a/cc/output/filter_operation.cc
+++ b/cc/output/filter_operation.cc
@@ -27,8 +27,9 @@ bool FilterOperation::operator==(const FilterOperation& other) const {
drop_shadow_offset_ == other.drop_shadow_offset_ &&
drop_shadow_color_ == other.drop_shadow_color_;
}
- if (type_ == REFERENCE)
+ if (type_ == REFERENCE) {
return image_filter_.get() == other.image_filter_.get();
+ }
if (type_ == ALPHA_THRESHOLD) {
return region_ == other.region_ &&
amount_ == other.amount_ &&
@@ -37,6 +38,8 @@ bool FilterOperation::operator==(const FilterOperation& other) const {
return amount_ == other.amount_;
}
+FilterOperation::FilterOperation() : FilterOperation(GRAYSCALE, 0.f) {}
+
FilterOperation::FilterOperation(FilterType type, float amount)
: type_(type),
amount_(amount),

Powered by Google App Engine
This is Rietveld 408576698