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_resource_holder.h" | 5 #include "cc/surfaces/surface_resource_holder.h" |
6 | 6 |
7 #include "cc/surfaces/surface_factory_client.h" | 7 #include "cc/surfaces/compositor_frame_sink_support.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
11 SurfaceResourceHolder::SurfaceResourceHolder(SurfaceFactoryClient* client) | 11 SurfaceResourceHolder::SurfaceResourceHolder(CompositorFrameSinkSupport* client) |
12 : client_(client) { | 12 : client_(client) {} |
13 } | |
14 | 13 |
15 SurfaceResourceHolder::~SurfaceResourceHolder() { | 14 SurfaceResourceHolder::~SurfaceResourceHolder() { |
16 } | 15 } |
17 | 16 |
18 SurfaceResourceHolder::ResourceRefs::ResourceRefs() | 17 SurfaceResourceHolder::ResourceRefs::ResourceRefs() |
19 : refs_received_from_child(0), refs_holding_resource_alive(0) { | 18 : refs_received_from_child(0), refs_holding_resource_alive(0) { |
20 } | 19 } |
21 | 20 |
22 void SurfaceResourceHolder::Reset() { | 21 void SurfaceResourceHolder::Reset() { |
23 resource_id_info_map_.clear(); | 22 resource_id_info_map_.clear(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 returned.count = ref.refs_received_from_child; | 67 returned.count = ref.refs_received_from_child; |
69 resources_available_to_return.push_back(returned); | 68 resources_available_to_return.push_back(returned); |
70 resource_id_info_map_.erase(count_it); | 69 resource_id_info_map_.erase(count_it); |
71 } | 70 } |
72 } | 71 } |
73 | 72 |
74 client_->ReturnResources(resources_available_to_return); | 73 client_->ReturnResources(resources_available_to_return); |
75 } | 74 } |
76 | 75 |
77 } // namespace cc | 76 } // namespace cc |
OLD | NEW |