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

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

Issue 398533002: Make DrawQuad constructors public, rm DQ::Create() function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get rid of make_scoped_ptr Created 6 years, 5 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
« no previous file with comments | « cc/quads/yuv_video_draw_quad.cc ('k') | mojo/examples/surfaces_app/child_impl.cc » ('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 "cc/output/filter_operations.h" 8 #include "cc/output/filter_operations.h"
9 #include "content/public/common/common_param_traits.h" 9 #include "content/public/common/common_param_traits.h"
10 #include "third_party/skia/include/core/SkData.h" 10 #include "third_party/skia/include/core/SkData.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 to_reserve += p.quad_list.size() * sizeof(size_t); 388 to_reserve += p.quad_list.size() * sizeof(size_t);
389 389
390 // The largest quad type, verified by a unit test. 390 // The largest quad type, verified by a unit test.
391 to_reserve += p.quad_list.size() * sizeof(cc::RenderPassDrawQuad); 391 to_reserve += p.quad_list.size() * sizeof(cc::RenderPassDrawQuad);
392 return to_reserve; 392 return to_reserve;
393 } 393 }
394 394
395 template<typename QuadType> 395 template<typename QuadType>
396 static scoped_ptr<cc::DrawQuad> ReadDrawQuad(const Message* m, 396 static scoped_ptr<cc::DrawQuad> ReadDrawQuad(const Message* m,
397 PickleIterator* iter) { 397 PickleIterator* iter) {
398 scoped_ptr<QuadType> quad = QuadType::Create(); 398 scoped_ptr<QuadType> quad(new QuadType);
399 if (!ReadParam(m, iter, quad.get())) 399 if (!ReadParam(m, iter, quad.get()))
400 return scoped_ptr<QuadType>().template PassAs<cc::DrawQuad>(); 400 return scoped_ptr<QuadType>().template PassAs<cc::DrawQuad>();
401 return quad.template PassAs<cc::DrawQuad>(); 401 return quad.template PassAs<cc::DrawQuad>();
402 } 402 }
403 403
404 bool ParamTraits<cc::RenderPass>::Read( 404 bool ParamTraits<cc::RenderPass>::Read(
405 const Message* m, PickleIterator* iter, param_type* p) { 405 const Message* m, PickleIterator* iter, param_type* p) {
406 cc::RenderPass::Id id(-1, -1); 406 cc::RenderPass::Id id(-1, -1);
407 gfx::Rect output_rect; 407 gfx::Rect output_rect;
408 gfx::Rect damage_rect; 408 gfx::Rect damage_rect;
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 l->append(", "); 794 l->append(", ");
795 LogParam(p.size, l); 795 LogParam(p.size, l);
796 l->append(", "); 796 l->append(", ");
797 LogParam(p.damage_rect, l); 797 LogParam(p.damage_rect, l);
798 l->append(", "); 798 l->append(", ");
799 LogParam(p.bitmap_id, l); 799 LogParam(p.bitmap_id, l);
800 l->append(")"); 800 l->append(")");
801 } 801 }
802 802
803 } // namespace IPC 803 } // namespace IPC
OLDNEW
« no previous file with comments | « cc/quads/yuv_video_draw_quad.cc ('k') | mojo/examples/surfaces_app/child_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698