| 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 "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
| 8 #include "cc/output/filter_operations.h" | 8 #include "cc/output/filter_operations.h" |
| 9 #include "content/public/common/common_param_traits.h" | 9 #include "content/public/common/common_param_traits.h" |
| 10 #include "third_party/skia/include/core/SkData.h" | 10 #include "third_party/skia/include/core/SkData.h" |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 to_reserve += p.quad_list.size() * sizeof(size_t); | 388 to_reserve += p.quad_list.size() * sizeof(size_t); |
| 389 | 389 |
| 390 // The largest quad type, verified by a unit test. | 390 // The largest quad type, verified by a unit test. |
| 391 to_reserve += p.quad_list.size() * sizeof(cc::RenderPassDrawQuad); | 391 to_reserve += p.quad_list.size() * sizeof(cc::RenderPassDrawQuad); |
| 392 return to_reserve; | 392 return to_reserve; |
| 393 } | 393 } |
| 394 | 394 |
| 395 template<typename QuadType> | 395 template<typename QuadType> |
| 396 static scoped_ptr<cc::DrawQuad> ReadDrawQuad(const Message* m, | 396 static scoped_ptr<cc::DrawQuad> ReadDrawQuad(const Message* m, |
| 397 PickleIterator* iter) { | 397 PickleIterator* iter) { |
| 398 scoped_ptr<QuadType> quad = QuadType::Create(); | 398 scoped_ptr<QuadType> quad(new QuadType); |
| 399 if (!ReadParam(m, iter, quad.get())) | 399 if (!ReadParam(m, iter, quad.get())) |
| 400 return scoped_ptr<QuadType>().template PassAs<cc::DrawQuad>(); | 400 return scoped_ptr<QuadType>().template PassAs<cc::DrawQuad>(); |
| 401 return quad.template PassAs<cc::DrawQuad>(); | 401 return quad.template PassAs<cc::DrawQuad>(); |
| 402 } | 402 } |
| 403 | 403 |
| 404 bool ParamTraits<cc::RenderPass>::Read( | 404 bool ParamTraits<cc::RenderPass>::Read( |
| 405 const Message* m, PickleIterator* iter, param_type* p) { | 405 const Message* m, PickleIterator* iter, param_type* p) { |
| 406 cc::RenderPass::Id id(-1, -1); | 406 cc::RenderPass::Id id(-1, -1); |
| 407 gfx::Rect output_rect; | 407 gfx::Rect output_rect; |
| 408 gfx::Rect damage_rect; | 408 gfx::Rect damage_rect; |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 l->append(", "); | 794 l->append(", "); |
| 795 LogParam(p.size, l); | 795 LogParam(p.size, l); |
| 796 l->append(", "); | 796 l->append(", "); |
| 797 LogParam(p.damage_rect, l); | 797 LogParam(p.damage_rect, l); |
| 798 l->append(", "); | 798 l->append(", "); |
| 799 LogParam(p.bitmap_id, l); | 799 LogParam(p.bitmap_id, l); |
| 800 l->append(")"); | 800 l->append(")"); |
| 801 } | 801 } |
| 802 | 802 |
| 803 } // namespace IPC | 803 } // namespace IPC |
| OLD | NEW |