Chromium Code Reviews| 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/compositor_frame.h" | 7 #include "cc/compositor_frame.h" |
| 8 #include "content/public/common/common_param_traits.h" | 8 #include "content/public/common/common_param_traits.h" |
| 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" | 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" |
| 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h" |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 650 LogParam(p.resource_list, l); | 650 LogParam(p.resource_list, l); |
| 651 l->append(", ["); | 651 l->append(", ["); |
| 652 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { | 652 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { |
| 653 if (i) | 653 if (i) |
| 654 l->append(", "); | 654 l->append(", "); |
| 655 LogParam(*p.render_pass_list[i], l); | 655 LogParam(*p.render_pass_list[i], l); |
| 656 } | 656 } |
| 657 l->append("])"); | 657 l->append("])"); |
| 658 } | 658 } |
| 659 | 659 |
| 660 void ParamTraits<cc::DrawQuad::AntiAliasing>::Write( | |
|
jamesr
2013/01/08 23:01:58
yeah this really doesn't make sense to serialize s
reveman
2013/01/09 14:20:05
This is not the full AA decision. It tells the par
| |
| 661 Message* m, const cc::DrawQuad::AntiAliasing& p) { | |
| 662 ParamTraits<float>::Write(m, p.left_edge); | |
| 663 ParamTraits<float>::Write(m, p.top_edge); | |
| 664 ParamTraits<float>::Write(m, p.right_edge); | |
| 665 ParamTraits<float>::Write(m, p.bottom_edge); | |
| 666 } | |
| 667 | |
| 668 bool ParamTraits<cc::DrawQuad::AntiAliasing>::Read( | |
| 669 const Message* m, | |
| 670 PickleIterator* iter, | |
| 671 cc::DrawQuad::AntiAliasing* r) { | |
| 672 bool left_edge, top_edge, right_edge, bottom_edge; | |
| 673 if (!ParamTraits<bool>::Read(m, iter, &left_edge) || | |
| 674 !ParamTraits<bool>::Read(m, iter, &top_edge) || | |
| 675 !ParamTraits<bool>::Read(m, iter, &right_edge) || | |
| 676 !ParamTraits<bool>::Read(m, iter, &bottom_edge)) | |
| 677 return false; | |
| 678 r->left_edge = left_edge; | |
| 679 r->top_edge = top_edge; | |
| 680 r->right_edge = right_edge; | |
| 681 r->bottom_edge = bottom_edge; | |
| 682 return true; | |
| 683 } | |
| 684 | |
| 685 void ParamTraits<cc::DrawQuad::AntiAliasing>::Log( | |
| 686 const cc::DrawQuad::AntiAliasing& p, std::string* l) { | |
| 687 l->append(base::StringPrintf("(%d, %d, %d, %d)", | |
| 688 p.left_edge, | |
| 689 p.top_edge, | |
| 690 p.right_edge, | |
| 691 p.bottom_edge)); | |
| 692 } | |
| 693 | |
| 660 } // namespace IPC | 694 } // namespace IPC |
| OLD | NEW |