| 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 "content/public/common/common_param_traits.h" | 7 #include "content/public/common/common_param_traits.h" |
| 8 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" | 8 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" |
| 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" | 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" |
| 10 #include "ui/gfx/transform.h" | 10 #include "ui/gfx/transform.h" |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 | 407 |
| 408 bool ParamTraits<cc::RenderPass>::Read( | 408 bool ParamTraits<cc::RenderPass>::Read( |
| 409 const Message* m, PickleIterator* iter, param_type* p) { | 409 const Message* m, PickleIterator* iter, param_type* p) { |
| 410 cc::RenderPass::Id id(-1, -1); | 410 cc::RenderPass::Id id(-1, -1); |
| 411 gfx::Rect output_rect; | 411 gfx::Rect output_rect; |
| 412 gfx::RectF damage_rect; | 412 gfx::RectF damage_rect; |
| 413 gfx::Transform transform_to_root_target; | 413 gfx::Transform transform_to_root_target; |
| 414 bool has_transparent_background; | 414 bool has_transparent_background; |
| 415 bool has_occlusion_from_outside_target_surface; | 415 bool has_occlusion_from_outside_target_surface; |
| 416 WebKit::WebFilterOperations filters; | 416 WebKit::WebFilterOperations filters; |
| 417 skia::RefPtr<SkImageFilter> filter; |
| 417 WebKit::WebFilterOperations background_filters; | 418 WebKit::WebFilterOperations background_filters; |
| 418 size_t shared_quad_state_list_size; | 419 size_t shared_quad_state_list_size; |
| 419 size_t quad_list_size; | 420 size_t quad_list_size; |
| 420 | 421 |
| 421 if (!ReadParam(m, iter, &id) || | 422 if (!ReadParam(m, iter, &id) || |
| 422 !ReadParam(m, iter, &output_rect) || | 423 !ReadParam(m, iter, &output_rect) || |
| 423 !ReadParam(m, iter, &damage_rect) || | 424 !ReadParam(m, iter, &damage_rect) || |
| 424 !ReadParam(m, iter, &transform_to_root_target) || | 425 !ReadParam(m, iter, &transform_to_root_target) || |
| 425 !ReadParam(m, iter, &has_transparent_background) || | 426 !ReadParam(m, iter, &has_transparent_background) || |
| 426 !ReadParam(m, iter, &has_occlusion_from_outside_target_surface) || | 427 !ReadParam(m, iter, &has_occlusion_from_outside_target_surface) || |
| 427 !ReadParam(m, iter, &filters) || | 428 !ReadParam(m, iter, &filters) || |
| 428 !ReadParam(m, iter, &background_filters) || | 429 !ReadParam(m, iter, &background_filters) || |
| 429 !ReadParam(m, iter, &shared_quad_state_list_size) || | 430 !ReadParam(m, iter, &shared_quad_state_list_size) || |
| 430 !ReadParam(m, iter, &quad_list_size)) | 431 !ReadParam(m, iter, &quad_list_size)) |
| 431 return false; | 432 return false; |
| 432 | 433 |
| 433 p->SetAll(id, | 434 p->SetAll(id, |
| 434 output_rect, | 435 output_rect, |
| 435 damage_rect, | 436 damage_rect, |
| 436 transform_to_root_target, | 437 transform_to_root_target, |
| 437 has_transparent_background, | 438 has_transparent_background, |
| 438 has_occlusion_from_outside_target_surface, | 439 has_occlusion_from_outside_target_surface, |
| 439 filters, | 440 filters, |
| 440 NULL, // TODO(danakj): filter isn't being serialized. | 441 filter, // TODO(danakj): filter isn't being serialized. |
| 441 background_filters); | 442 background_filters); |
| 442 | 443 |
| 443 for (size_t i = 0; i < shared_quad_state_list_size; ++i) { | 444 for (size_t i = 0; i < shared_quad_state_list_size; ++i) { |
| 444 scoped_ptr<cc::SharedQuadState> state(cc::SharedQuadState::Create()); | 445 scoped_ptr<cc::SharedQuadState> state(cc::SharedQuadState::Create()); |
| 445 if (!ReadParam(m, iter, state.get())) | 446 if (!ReadParam(m, iter, state.get())) |
| 446 return false; | 447 return false; |
| 447 p->shared_quad_state_list.append(state.Pass()); | 448 p->shared_quad_state_list.append(state.Pass()); |
| 448 } | 449 } |
| 449 | 450 |
| 450 size_t last_shared_quad_state_index = 0; | 451 size_t last_shared_quad_state_index = 0; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 LogParam(*cc::YUVVideoDrawQuad::MaterialCast(quad), l); | 569 LogParam(*cc::YUVVideoDrawQuad::MaterialCast(quad), l); |
| 569 break; | 570 break; |
| 570 case cc::DrawQuad::INVALID: | 571 case cc::DrawQuad::INVALID: |
| 571 break; | 572 break; |
| 572 } | 573 } |
| 573 } | 574 } |
| 574 l->append("])"); | 575 l->append("])"); |
| 575 } | 576 } |
| 576 | 577 |
| 577 } // namespace IPC | 578 } // namespace IPC |
| OLD | NEW |