| 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 case cc::DrawQuad::YUV_VIDEO_CONTENT: | 529 case cc::DrawQuad::YUV_VIDEO_CONTENT: |
| 530 LogParam(*cc::YUVVideoDrawQuad::MaterialCast(quad), l); | 530 LogParam(*cc::YUVVideoDrawQuad::MaterialCast(quad), l); |
| 531 break; | 531 break; |
| 532 case cc::DrawQuad::INVALID: | 532 case cc::DrawQuad::INVALID: |
| 533 break; | 533 break; |
| 534 } | 534 } |
| 535 } | 535 } |
| 536 l->append("])"); | 536 l->append("])"); |
| 537 } | 537 } |
| 538 | 538 |
| 539 void ParamTraits<cc::Mailbox>::Write(Message* m, const param_type& p) { | |
| 540 m->WriteBytes(p.name, sizeof(p.name)); | |
| 541 } | |
| 542 | |
| 543 bool ParamTraits<cc::Mailbox>::Read(const Message* m, | |
| 544 PickleIterator* iter, | |
| 545 param_type* p) { | |
| 546 const char* bytes = NULL; | |
| 547 if (!m->ReadBytes(iter, &bytes, sizeof(p->name))) | |
| 548 return false; | |
| 549 DCHECK(bytes); | |
| 550 memcpy(p->name, bytes, sizeof(p->name)); | |
| 551 return true; | |
| 552 } | |
| 553 | |
| 554 void ParamTraits<cc::Mailbox>::Log(const param_type& p, std::string* l) { | |
| 555 for (size_t i = 0; i < sizeof(p.name); ++i) | |
| 556 *l += base::StringPrintf("%02x", p.name[i]); | |
| 557 } | |
| 558 | |
| 559 namespace { | 539 namespace { |
| 560 enum CompositorFrameType { | 540 enum CompositorFrameType { |
| 561 NO_FRAME, | 541 NO_FRAME, |
| 562 DELEGATED_FRAME, | 542 DELEGATED_FRAME, |
| 563 GL_FRAME, | 543 GL_FRAME, |
| 564 }; | 544 }; |
| 565 } | 545 } |
| 566 | 546 |
| 567 void ParamTraits<cc::CompositorFrame>::Write(Message* m, | 547 void ParamTraits<cc::CompositorFrame>::Write(Message* m, |
| 568 const param_type& p) { | 548 const param_type& p) { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 l->append(", ["); | 679 l->append(", ["); |
| 700 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { | 680 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { |
| 701 if (i) | 681 if (i) |
| 702 l->append(", "); | 682 l->append(", "); |
| 703 LogParam(*p.render_pass_list[i], l); | 683 LogParam(*p.render_pass_list[i], l); |
| 704 } | 684 } |
| 705 l->append("])"); | 685 l->append("])"); |
| 706 } | 686 } |
| 707 | 687 |
| 708 } // namespace IPC | 688 } // namespace IPC |
| OLD | NEW |