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

Unified Diff: cc/ipc/cc_param_traits.cc

Issue 2543473004: cc: Move filters from RenderPassDrawQuad to RenderPass (Closed)
Patch Set: Rebase again Created 4 years 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 | « android_webview/browser/surfaces_instance.cc ('k') | cc/ipc/cc_param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/cc_param_traits.cc
diff --git a/cc/ipc/cc_param_traits.cc b/cc/ipc/cc_param_traits.cc
index 75d2fee8b4c7dcbe178080d5d6edd5764e32a6d9..77c4dc1bdf9d656b048a1e93fb6ae7866995ed11 100644
--- a/cc/ipc/cc_param_traits.cc
+++ b/cc/ipc/cc_param_traits.cc
@@ -326,6 +326,8 @@ void ParamTraits<cc::RenderPass>::Write(base::Pickle* m, const param_type& p) {
WriteParam(m, p.output_rect);
WriteParam(m, p.damage_rect);
WriteParam(m, p.transform_to_root_target);
+ WriteParam(m, p.filters);
+ WriteParam(m, p.background_filters);
WriteParam(m, p.has_transparent_background);
WriteParam(m, base::checked_cast<uint32_t>(p.quad_list.size()));
@@ -407,6 +409,12 @@ static size_t ReserveSizeForRenderPassWrite(const cc::RenderPass& p) {
// The largest quad type, verified by a unit test.
to_reserve += p.quad_list.size() * cc::LargestDrawQuadSize();
+
+ base::PickleSizer sizer;
+ GetParamSize(&sizer, p.filters);
+ GetParamSize(&sizer, p.background_filters);
+ to_reserve += sizer.payload_size();
+
return to_reserve;
}
@@ -427,18 +435,22 @@ bool ParamTraits<cc::RenderPass>::Read(const base::Pickle* m,
gfx::Rect output_rect;
gfx::Rect damage_rect;
gfx::Transform transform_to_root_target;
+ cc::FilterOperations filters;
+ cc::FilterOperations background_filters;
bool has_transparent_background;
uint32_t quad_list_size;
if (!ReadParam(m, iter, &id) || !ReadParam(m, iter, &output_rect) ||
!ReadParam(m, iter, &damage_rect) ||
!ReadParam(m, iter, &transform_to_root_target) ||
+ !ReadParam(m, iter, &filters) ||
+ !ReadParam(m, iter, &background_filters) ||
!ReadParam(m, iter, &has_transparent_background) ||
!ReadParam(m, iter, &quad_list_size))
return false;
- p->SetAll(id, output_rect, damage_rect, transform_to_root_target,
- has_transparent_background);
+ p->SetAll(id, output_rect, damage_rect, transform_to_root_target, filters,
+ background_filters, has_transparent_background);
for (uint32_t i = 0; i < quad_list_size; ++i) {
cc::DrawQuad::Material material;
@@ -521,6 +533,10 @@ void ParamTraits<cc::RenderPass>::Log(const param_type& p, std::string* l) {
l->append(", ");
LogParam(p.transform_to_root_target, l);
l->append(", ");
+ LogParam(p.filters, l);
+ l->append(", ");
+ LogParam(p.background_filters, l);
+ l->append(", ");
LogParam(p.has_transparent_background, l);
l->append(", ");
« no previous file with comments | « android_webview/browser/surfaces_instance.cc ('k') | cc/ipc/cc_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698