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

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

Issue 221523003: cc: Remove all usage of GetArea() from production code in cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: getarea: Created 6 years, 8 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
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/output/filter_operations.h" 9 #include "cc/output/filter_operations.h"
10 #include "content/public/common/common_param_traits.h" 10 #include "content/public/common/common_param_traits.h"
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { 748 for (size_t i = 0; i < p.render_pass_list.size(); ++i) {
749 if (i) 749 if (i)
750 l->append(", "); 750 l->append(", ");
751 LogParam(*p.render_pass_list[i], l); 751 LogParam(*p.render_pass_list[i], l);
752 } 752 }
753 l->append("])"); 753 l->append("])");
754 } 754 }
755 755
756 void ParamTraits<cc::SoftwareFrameData>::Write(Message* m, 756 void ParamTraits<cc::SoftwareFrameData>::Write(Message* m,
757 const param_type& p) { 757 const param_type& p) {
758 DCHECK(p.CheckedSizeInBytes().IsValid()); 758 DCHECK(cc::SharedBitmap::VerifySizeInBytes(p.size));
759 759
760 m->Reserve(sizeof(cc::SoftwareFrameData)); 760 m->Reserve(sizeof(cc::SoftwareFrameData));
761 WriteParam(m, p.id); 761 WriteParam(m, p.id);
762 WriteParam(m, p.size); 762 WriteParam(m, p.size);
763 WriteParam(m, p.damage_rect); 763 WriteParam(m, p.damage_rect);
764 WriteParam(m, p.handle); 764 WriteParam(m, p.handle);
765 } 765 }
766 766
767 bool ParamTraits<cc::SoftwareFrameData>::Read(const Message* m, 767 bool ParamTraits<cc::SoftwareFrameData>::Read(const Message* m,
768 PickleIterator* iter, 768 PickleIterator* iter,
769 param_type* p) { 769 param_type* p) {
770 if (!ReadParam(m, iter, &p->id)) 770 if (!ReadParam(m, iter, &p->id))
771 return false; 771 return false;
772 if (!ReadParam(m, iter, &p->size) || !p->CheckedSizeInBytes().IsValid()) 772 if (!ReadParam(m, iter, &p->size) ||
773 !cc::SharedBitmap::VerifySizeInBytes(p->size))
773 return false; 774 return false;
774 if (!ReadParam(m, iter, &p->damage_rect)) 775 if (!ReadParam(m, iter, &p->damage_rect))
775 return false; 776 return false;
776 if (!ReadParam(m, iter, &p->handle)) 777 if (!ReadParam(m, iter, &p->handle))
777 return false; 778 return false;
778 return true; 779 return true;
779 } 780 }
780 781
781 void ParamTraits<cc::SoftwareFrameData>::Log(const param_type& p, 782 void ParamTraits<cc::SoftwareFrameData>::Log(const param_type& p,
782 std::string* l) { 783 std::string* l) {
783 l->append("SoftwareFrameData("); 784 l->append("SoftwareFrameData(");
784 LogParam(p.id, l); 785 LogParam(p.id, l);
785 l->append(", "); 786 l->append(", ");
786 LogParam(p.size, l); 787 LogParam(p.size, l);
787 l->append(", "); 788 l->append(", ");
788 LogParam(p.damage_rect, l); 789 LogParam(p.damage_rect, l);
789 l->append(", "); 790 l->append(", ");
790 LogParam(p.handle, l); 791 LogParam(p.handle, l);
791 l->append(")"); 792 l->append(")");
792 } 793 }
793 794
794 } // namespace IPC 795 } // namespace IPC
OLDNEW
« no previous file with comments | « content/child/child_shared_bitmap_manager.cc ('k') | content/common/host_shared_bitmap_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698