Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: content/common/cc_messages.cc

Issue 13248003: Pass a sequence number along with the DIB handle when compositing in software. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/cc_messages.h ('k') | ui/surface/transport_dib.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 else if (p.gl_frame_data) 620 else if (p.gl_frame_data)
621 LogParam(*p.gl_frame_data, l); 621 LogParam(*p.gl_frame_data, l);
622 else if (p.software_frame_data) 622 else if (p.software_frame_data)
623 LogParam(*p.software_frame_data, l); 623 LogParam(*p.software_frame_data, l);
624 l->append(")"); 624 l->append(")");
625 } 625 }
626 626
627 void ParamTraits<cc::CompositorFrameAck>::Write(Message* m, 627 void ParamTraits<cc::CompositorFrameAck>::Write(Message* m,
628 const param_type& p) { 628 const param_type& p) {
629 WriteParam(m, p.resources); 629 WriteParam(m, p.resources);
630 WriteParam(m, p.last_content_dib); 630 WriteParam(m, p.last_dib_id);
631 if (p.gl_frame_data) { 631 if (p.gl_frame_data) {
632 WriteParam(m, static_cast<int>(GL_FRAME)); 632 WriteParam(m, static_cast<int>(GL_FRAME));
633 WriteParam(m, *p.gl_frame_data); 633 WriteParam(m, *p.gl_frame_data);
634 } else { 634 } else {
635 WriteParam(m, static_cast<int>(NO_FRAME)); 635 WriteParam(m, static_cast<int>(NO_FRAME));
636 } 636 }
637 } 637 }
638 638
639 bool ParamTraits<cc::CompositorFrameAck>::Read(const Message* m, 639 bool ParamTraits<cc::CompositorFrameAck>::Read(const Message* m,
640 PickleIterator* iter, 640 PickleIterator* iter,
641 param_type* p) { 641 param_type* p) {
642 if (!ReadParam(m, iter, &p->resources)) 642 if (!ReadParam(m, iter, &p->resources))
643 return false; 643 return false;
644 644
645 if (!ReadParam(m, iter, &p->last_content_dib)) 645 if (!ReadParam(m, iter, &p->last_dib_id))
646 return false; 646 return false;
647 647
648 int compositor_frame_type; 648 int compositor_frame_type;
649 if (!ReadParam(m, iter, &compositor_frame_type)) 649 if (!ReadParam(m, iter, &compositor_frame_type))
650 return false; 650 return false;
651 651
652 switch (compositor_frame_type) { 652 switch (compositor_frame_type) {
653 case NO_FRAME: 653 case NO_FRAME:
654 break; 654 break;
655 case GL_FRAME: 655 case GL_FRAME:
656 p->gl_frame_data.reset(new cc::GLFrameData()); 656 p->gl_frame_data.reset(new cc::GLFrameData());
657 if (!ReadParam(m, iter, p->gl_frame_data.get())) 657 if (!ReadParam(m, iter, p->gl_frame_data.get()))
658 return false; 658 return false;
659 break; 659 break;
660 default: 660 default:
661 return false; 661 return false;
662 } 662 }
663 return true; 663 return true;
664 } 664 }
665 665
666 void ParamTraits<cc::CompositorFrameAck>::Log(const param_type& p, 666 void ParamTraits<cc::CompositorFrameAck>::Log(const param_type& p,
667 std::string* l) { 667 std::string* l) {
668 l->append("CompositorFrameAck("); 668 l->append("CompositorFrameAck(");
669 LogParam(p.resources, l); 669 LogParam(p.resources, l);
670 l->append(", "); 670 l->append(", ");
671 LogParam(p.last_content_dib, l); 671 LogParam(p.last_dib_id, l);
672 l->append(", "); 672 l->append(", ");
673 if (p.gl_frame_data) 673 if (p.gl_frame_data)
674 LogParam(*p.gl_frame_data, l); 674 LogParam(*p.gl_frame_data, l);
675 l->append(")"); 675 l->append(")");
676 } 676 }
677 677
678 void ParamTraits<cc::DelegatedFrameData>::Write(Message* m, 678 void ParamTraits<cc::DelegatedFrameData>::Write(Message* m,
679 const param_type& p) { 679 const param_type& p) {
680 WriteParam(m, p.resource_list); 680 WriteParam(m, p.resource_list);
681 WriteParam(m, p.render_pass_list.size()); 681 WriteParam(m, p.render_pass_list.size());
(...skipping 27 matching lines...) Expand all
709 l->append(", ["); 709 l->append(", [");
710 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { 710 for (size_t i = 0; i < p.render_pass_list.size(); ++i) {
711 if (i) 711 if (i)
712 l->append(", "); 712 l->append(", ");
713 LogParam(*p.render_pass_list[i], l); 713 LogParam(*p.render_pass_list[i], l);
714 } 714 }
715 l->append("])"); 715 l->append("])");
716 } 716 }
717 717
718 } // namespace IPC 718 } // namespace IPC
OLDNEW
« no previous file with comments | « content/common/cc_messages.h ('k') | ui/surface/transport_dib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698