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/surface_factory_client.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 ref.sync_token = it->sync_token; | 64 ref.sync_token = it->sync_token; |
65 if (ref.refs_holding_resource_alive == 0) { | 65 if (ref.refs_holding_resource_alive == 0) { |
66 ReturnedResource returned = *it; | 66 ReturnedResource returned = *it; |
67 returned.sync_token = ref.sync_token; | 67 returned.sync_token = ref.sync_token; |
68 returned.count = ref.refs_received_from_child; | 68 returned.count = ref.refs_received_from_child; |
69 resources_available_to_return.push_back(returned); | 69 resources_available_to_return.push_back(returned); |
70 resource_id_info_map_.erase(count_it); | 70 resource_id_info_map_.erase(count_it); |
71 } | 71 } |
72 } | 72 } |
73 | 73 |
74 client_->ReturnResources(resources_available_to_return); | 74 if (client_) |
Fady Samuel
2016/11/08 22:23:59
Is this necessary?
Saman Sami
2016/11/11 17:49:58
Removed
| |
75 client_->ReturnResources(resources_available_to_return); | |
75 } | 76 } |
76 | 77 |
77 } // namespace cc | 78 } // namespace cc |
OLD | NEW |