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 "base/metrics/histogram.h" | |
| 7 #include "cc/compositor_frame.h" | 8 #include "cc/compositor_frame.h" |
| 8 #include "content/public/common/common_param_traits.h" | 9 #include "content/public/common/common_param_traits.h" |
| 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" |
| 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h" | 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h" |
| 11 #include "ui/gfx/transform.h" | 12 #include "ui/gfx/transform.h" |
| 12 | 13 |
| 13 namespace IPC { | 14 namespace IPC { |
| 14 | 15 |
| 15 void ParamTraits<WebKit::WebData>::Write(Message* m, const param_type& p) { | 16 void ParamTraits<WebKit::WebData>::Write(Message* m, const param_type& p) { |
| 16 if (p.isEmpty()) { | 17 if (p.isEmpty()) { |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 589 memcpy(p->name, bytes, sizeof(p->name)); | 590 memcpy(p->name, bytes, sizeof(p->name)); |
| 590 return true; | 591 return true; |
| 591 } | 592 } |
| 592 | 593 |
| 593 void ParamTraits<cc::Mailbox>::Log(const param_type& p, std::string* l) { | 594 void ParamTraits<cc::Mailbox>::Log(const param_type& p, std::string* l) { |
| 594 for (size_t i = 0; i < sizeof(p.name); ++i) | 595 for (size_t i = 0; i < sizeof(p.name); ++i) |
| 595 *l += base::StringPrintf("%02x", p.name[i]); | 596 *l += base::StringPrintf("%02x", p.name[i]); |
| 596 } | 597 } |
| 597 | 598 |
| 598 void ParamTraits<cc::CompositorFrame>::Write(Message* m, const param_type& p) { | 599 void ParamTraits<cc::CompositorFrame>::Write(Message* m, const param_type& p) { |
| 600 HISTOGRAM_COUNTS("Renderer4.renderPassCount", frame.renderPasses.size()); | |
|
piman
2012/12/03 20:30:22
I was thinking of adding this in the GLRenderer (o
danakj
2012/12/03 20:31:41
Oh, I thought that too, then I realized we get mor
| |
| 599 WriteParam(m, p.size); | 601 WriteParam(m, p.size); |
| 600 WriteParam(m, p.resource_list); | 602 WriteParam(m, p.resource_list); |
| 601 WriteParam(m, p.render_pass_list.size()); | 603 WriteParam(m, p.render_pass_list.size()); |
| 602 for (size_t i = 0; i < p.render_pass_list.size(); ++i) | 604 for (size_t i = 0; i < p.render_pass_list.size(); ++i) |
| 603 WriteParam(m, *p.render_pass_list[i]); | 605 WriteParam(m, *p.render_pass_list[i]); |
| 604 } | 606 } |
| 605 | 607 |
| 606 bool ParamTraits<cc::CompositorFrame>::Read(const Message* m, | 608 bool ParamTraits<cc::CompositorFrame>::Read(const Message* m, |
| 607 PickleIterator* iter, | 609 PickleIterator* iter, |
| 608 param_type* p) { | 610 param_type* p) { |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 632 l->append(", ["); | 634 l->append(", ["); |
| 633 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { | 635 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { |
| 634 if (i) | 636 if (i) |
| 635 l->append(", "); | 637 l->append(", "); |
| 636 LogParam(*p.render_pass_list[i], l); | 638 LogParam(*p.render_pass_list[i], l); |
| 637 } | 639 } |
| 638 l->append("])"); | 640 l->append("])"); |
| 639 } | 641 } |
| 640 | 642 |
| 641 } // namespace IPC | 643 } // namespace IPC |
| OLD | NEW |