| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/cc_messages.h" | 5 #include "content/common/cc_messages.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
| 9 #include "cc/output/filter_operations.h" | 9 #include "cc/output/filter_operations.h" |
| 10 #include "content/public/common/common_param_traits.h" | 10 #include "content/public/common/common_param_traits.h" |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 for (int i = 0; i < 16; ++i) { | 278 for (int i = 0; i < 16; ++i) { |
| 279 if (i > 0) | 279 if (i > 0) |
| 280 l->append(", "); | 280 l->append(", "); |
| 281 LogParam(row_major_data[i], l); | 281 LogParam(row_major_data[i], l); |
| 282 } | 282 } |
| 283 l->append(") "); | 283 l->append(") "); |
| 284 } | 284 } |
| 285 | 285 |
| 286 void ParamTraits<cc::RenderPass>::Write( | 286 void ParamTraits<cc::RenderPass>::Write( |
| 287 Message* m, const param_type& p) { | 287 Message* m, const param_type& p) { |
| 288 DCHECK(p.overlay_state == cc::RenderPass::NO_OVERLAY); |
| 288 WriteParam(m, p.id); | 289 WriteParam(m, p.id); |
| 289 WriteParam(m, p.output_rect); | 290 WriteParam(m, p.output_rect); |
| 290 WriteParam(m, p.damage_rect); | 291 WriteParam(m, p.damage_rect); |
| 291 WriteParam(m, p.transform_to_root_target); | 292 WriteParam(m, p.transform_to_root_target); |
| 292 WriteParam(m, p.has_transparent_background); | 293 WriteParam(m, p.has_transparent_background); |
| 293 WriteParam(m, p.shared_quad_state_list.size()); | 294 WriteParam(m, p.shared_quad_state_list.size()); |
| 294 WriteParam(m, p.quad_list.size()); | 295 WriteParam(m, p.quad_list.size()); |
| 295 | 296 |
| 296 size_t shared_quad_state_index = 0; | 297 size_t shared_quad_state_index = 0; |
| 297 size_t last_shared_quad_state_index = kuint32max; | 298 size_t last_shared_quad_state_index = kuint32max; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 !ReadParam(m, iter, &transform_to_root_target) || | 415 !ReadParam(m, iter, &transform_to_root_target) || |
| 415 !ReadParam(m, iter, &has_transparent_background) || | 416 !ReadParam(m, iter, &has_transparent_background) || |
| 416 !ReadParam(m, iter, &shared_quad_state_list_size) || | 417 !ReadParam(m, iter, &shared_quad_state_list_size) || |
| 417 !ReadParam(m, iter, &quad_list_size)) | 418 !ReadParam(m, iter, &quad_list_size)) |
| 418 return false; | 419 return false; |
| 419 | 420 |
| 420 p->SetAll(id, | 421 p->SetAll(id, |
| 421 output_rect, | 422 output_rect, |
| 422 damage_rect, | 423 damage_rect, |
| 423 transform_to_root_target, | 424 transform_to_root_target, |
| 424 has_transparent_background); | 425 has_transparent_background, |
| 426 cc::RenderPass::NO_OVERLAY); |
| 425 | 427 |
| 426 size_t last_shared_quad_state_index = kuint32max; | 428 size_t last_shared_quad_state_index = kuint32max; |
| 427 for (size_t i = 0; i < quad_list_size; ++i) { | 429 for (size_t i = 0; i < quad_list_size; ++i) { |
| 428 cc::DrawQuad::Material material; | 430 cc::DrawQuad::Material material; |
| 429 PickleIterator temp_iter = *iter; | 431 PickleIterator temp_iter = *iter; |
| 430 if (!ReadParam(m, &temp_iter, &material)) | 432 if (!ReadParam(m, &temp_iter, &material)) |
| 431 return false; | 433 return false; |
| 432 | 434 |
| 433 scoped_ptr<cc::DrawQuad> draw_quad; | 435 scoped_ptr<cc::DrawQuad> draw_quad; |
| 434 switch (material) { | 436 switch (material) { |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 l->append(", ["); | 749 l->append(", ["); |
| 748 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { | 750 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { |
| 749 if (i) | 751 if (i) |
| 750 l->append(", "); | 752 l->append(", "); |
| 751 LogParam(*p.render_pass_list[i], l); | 753 LogParam(*p.render_pass_list[i], l); |
| 752 } | 754 } |
| 753 l->append("])"); | 755 l->append("])"); |
| 754 } | 756 } |
| 755 | 757 |
| 756 } // namespace IPC | 758 } // namespace IPC |
| OLD | NEW |