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 <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 if (surface) | 431 if (surface) |
432 surface->TakeLatencyInfo(&frame->metadata.latency_info); | 432 surface->TakeLatencyInfo(&frame->metadata.latency_info); |
433 } | 433 } |
434 | 434 |
435 // TODO(jamesr): Aggregate all resource references into the returned frame's | 435 // TODO(jamesr): Aggregate all resource references into the returned frame's |
436 // resource list. | 436 // resource list. |
437 | 437 |
438 return frame.Pass(); | 438 return frame.Pass(); |
439 } | 439 } |
440 | 440 |
| 441 void SurfaceAggregator::ReleaseResources(SurfaceId surface_id) { |
| 442 SurfaceToResourceChildIdMap::iterator it = |
| 443 surface_id_to_resource_child_id_.find(surface_id); |
| 444 if (it != surface_id_to_resource_child_id_.end()) { |
| 445 provider_->DestroyChild(it->second); |
| 446 surface_id_to_resource_child_id_.erase(it); |
| 447 } |
| 448 } |
| 449 |
441 } // namespace cc | 450 } // namespace cc |
OLD | NEW |