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

Unified Diff: content/common/cc_messages.cc

Issue 21154002: Add support for converting cc::FilterOperations into an SkImageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 3 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 | « content/common/cc_messages.h ('k') | content/common/cc_messages_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/cc_messages.cc
diff --git a/content/common/cc_messages.cc b/content/common/cc_messages.cc
index a122ed80095256332555d57786aeba9377ea42ec..622567ec0710089ad8bacf8eed0133961e75d712 100644
--- a/content/common/cc_messages.cc
+++ b/content/common/cc_messages.cc
@@ -44,6 +44,9 @@ void ParamTraits<cc::FilterOperation>::Write(
WriteParam(m, p.amount());
WriteParam(m, p.zoom_inset());
break;
+ case cc::FilterOperation::REFERENCE:
+ WriteParam(m, p.image_filter());
+ break;
}
}
@@ -109,6 +112,16 @@ bool ParamTraits<cc::FilterOperation>::Read(
success = true;
}
break;
+ case cc::FilterOperation::REFERENCE: {
+ skia::RefPtr<SkImageFilter> filter;
+ if (!ReadParam(m, iter, &filter)) {
+ success = false;
+ break;
+ }
+ r->set_image_filter(filter);
+ success = true;
+ break;
+ }
}
return success;
}
@@ -151,6 +164,9 @@ void ParamTraits<cc::FilterOperation>::Log(
l->append(", ");
LogParam(p.zoom_inset(), l);
break;
+ case cc::FilterOperation::REFERENCE:
+ LogParam(p.image_filter(), l);
+ break;
}
l->append(")");
}
« no previous file with comments | « content/common/cc_messages.h ('k') | content/common/cc_messages_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698