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

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

Issue 16703020: Rewrite scoped_ptr<T>(NULL) to use the default ctor in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up insanity Created 7 years, 6 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 "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/public/platform/WebFilterOperations.h" 9 #include "third_party/WebKit/public/platform/WebFilterOperations.h"
10 #include "ui/gfx/transform.h" 10 #include "ui/gfx/transform.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 DCHECK_LT(shared_quad_state_index, p.shared_quad_state_list.size()); 372 DCHECK_LT(shared_quad_state_index, p.shared_quad_state_list.size());
373 WriteParam(m, shared_quad_state_index); 373 WriteParam(m, shared_quad_state_index);
374 } 374 }
375 } 375 }
376 376
377 template<typename QuadType> 377 template<typename QuadType>
378 static scoped_ptr<cc::DrawQuad> ReadDrawQuad(const Message* m, 378 static scoped_ptr<cc::DrawQuad> ReadDrawQuad(const Message* m,
379 PickleIterator* iter) { 379 PickleIterator* iter) {
380 scoped_ptr<QuadType> quad = QuadType::Create(); 380 scoped_ptr<QuadType> quad = QuadType::Create();
381 if (!ReadParam(m, iter, quad.get())) 381 if (!ReadParam(m, iter, quad.get()))
382 return scoped_ptr<QuadType>(NULL).template PassAs<cc::DrawQuad>(); 382 return scoped_ptr<QuadType>().template PassAs<cc::DrawQuad>();
383 return quad.template PassAs<cc::DrawQuad>(); 383 return quad.template PassAs<cc::DrawQuad>();
384 } 384 }
385 385
386 bool ParamTraits<cc::RenderPass>::Read( 386 bool ParamTraits<cc::RenderPass>::Read(
387 const Message* m, PickleIterator* iter, param_type* p) { 387 const Message* m, PickleIterator* iter, param_type* p) {
388 cc::RenderPass::Id id(-1, -1); 388 cc::RenderPass::Id id(-1, -1);
389 gfx::Rect output_rect; 389 gfx::Rect output_rect;
390 gfx::RectF damage_rect; 390 gfx::RectF damage_rect;
391 gfx::Transform transform_to_root_target; 391 gfx::Transform transform_to_root_target;
392 bool has_transparent_background; 392 bool has_transparent_background;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 l->append(", ["); 708 l->append(", [");
709 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { 709 for (size_t i = 0; i < p.render_pass_list.size(); ++i) {
710 if (i) 710 if (i)
711 l->append(", "); 711 l->append(", ");
712 LogParam(*p.render_pass_list[i], l); 712 LogParam(*p.render_pass_list[i], l);
713 } 713 }
714 l->append("])"); 714 l->append("])");
715 } 715 }
716 716
717 } // namespace IPC 717 } // namespace IPC
OLDNEW
« no previous file with comments | « content/browser/speech/google_streaming_remote_engine.cc ('k') | content/common/gpu/gpu_channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698