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

Side by Side Diff: cc/surfaces/surface_aggregator.cc

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 2 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/resources/ui_resource_request.cc ('k') | cc/test/animation_test_common.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "cc/surfaces/surface_aggregator.h" 5 #include "cc/surfaces/surface_aggregator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 dest_pass_list_->push_back(copy_pass.Pass()); 348 dest_pass_list_->push_back(copy_pass.Pass());
349 } 349 }
350 } 350 }
351 351
352 scoped_ptr<CompositorFrame> SurfaceAggregator::Aggregate(SurfaceId surface_id) { 352 scoped_ptr<CompositorFrame> SurfaceAggregator::Aggregate(SurfaceId surface_id) {
353 Surface* surface = manager_->GetSurfaceForId(surface_id); 353 Surface* surface = manager_->GetSurfaceForId(surface_id);
354 DCHECK(surface); 354 DCHECK(surface);
355 contained_surfaces_[surface_id] = surface->frame_index(); 355 contained_surfaces_[surface_id] = surface->frame_index();
356 const CompositorFrame* root_surface_frame = surface->GetEligibleFrame(); 356 const CompositorFrame* root_surface_frame = surface->GetEligibleFrame();
357 if (!root_surface_frame) 357 if (!root_surface_frame)
358 return scoped_ptr<CompositorFrame>(); 358 return nullptr;
359 TRACE_EVENT0("cc", "SurfaceAggregator::Aggregate"); 359 TRACE_EVENT0("cc", "SurfaceAggregator::Aggregate");
360 360
361 scoped_ptr<CompositorFrame> frame(new CompositorFrame); 361 scoped_ptr<CompositorFrame> frame(new CompositorFrame);
362 frame->delegated_frame_data = make_scoped_ptr(new DelegatedFrameData); 362 frame->delegated_frame_data = make_scoped_ptr(new DelegatedFrameData);
363 363
364 DCHECK(root_surface_frame->delegated_frame_data); 364 DCHECK(root_surface_frame->delegated_frame_data);
365 365
366 RenderPassList source_pass_list; 366 RenderPassList source_pass_list;
367 367
368 SurfaceSet::iterator it = referenced_surfaces_.insert(surface_id).first; 368 SurfaceSet::iterator it = referenced_surfaces_.insert(surface_id).first;
(...skipping 24 matching lines...) Expand all
393 surface->TakeLatencyInfo(&frame->metadata.latency_info); 393 surface->TakeLatencyInfo(&frame->metadata.latency_info);
394 } 394 }
395 395
396 // TODO(jamesr): Aggregate all resource references into the returned frame's 396 // TODO(jamesr): Aggregate all resource references into the returned frame's
397 // resource list. 397 // resource list.
398 398
399 return frame.Pass(); 399 return frame.Pass();
400 } 400 }
401 401
402 } // namespace cc 402 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/ui_resource_request.cc ('k') | cc/test/animation_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698