OLD | NEW |
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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 339 |
340 CopyPasses(source_pass_list, surface); | 340 CopyPasses(source_pass_list, surface); |
341 | 341 |
342 referenced_surfaces_.erase(it); | 342 referenced_surfaces_.erase(it); |
343 DCHECK(referenced_surfaces_.empty()); | 343 DCHECK(referenced_surfaces_.empty()); |
344 | 344 |
345 dest_pass_list_ = NULL; | 345 dest_pass_list_ = NULL; |
346 contained_surfaces_.swap(previous_contained_surfaces_); | 346 contained_surfaces_.swap(previous_contained_surfaces_); |
347 contained_surfaces_.clear(); | 347 contained_surfaces_.clear(); |
348 | 348 |
| 349 for (SurfaceIndexMap::iterator it = previous_contained_surfaces_.begin(); |
| 350 it != previous_contained_surfaces_.end(); |
| 351 ++it) { |
| 352 Surface* surface = manager_->GetSurfaceForId(it->first); |
| 353 if (surface) |
| 354 surface->TakeLatencyInfo(&frame->metadata.latency_info); |
| 355 } |
| 356 |
349 // TODO(jamesr): Aggregate all resource references into the returned frame's | 357 // TODO(jamesr): Aggregate all resource references into the returned frame's |
350 // resource list. | 358 // resource list. |
351 | 359 |
352 return frame.Pass(); | 360 return frame.Pass(); |
353 } | 361 } |
354 | 362 |
355 } // namespace cc | 363 } // namespace cc |
OLD | NEW |