| 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.h" | 5 #include "cc/surfaces/surface.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 draw_callback_ = DrawCallback(); | 159 draw_callback_ = DrawCallback(); |
| 160 callback.Run(drawn); | 160 callback.Run(drawn); |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 | 163 |
| 164 void Surface::AddDestructionDependency(SurfaceSequence sequence) { | 164 void Surface::AddDestructionDependency(SurfaceSequence sequence) { |
| 165 destruction_dependencies_.push_back(sequence); | 165 destruction_dependencies_.push_back(sequence); |
| 166 } | 166 } |
| 167 | 167 |
| 168 void Surface::SatisfyDestructionDependencies( | 168 void Surface::SatisfyDestructionDependencies( |
| 169 base::hash_set<SurfaceSequence>* sequences, | 169 std::unordered_set<SurfaceSequence, SurfaceSequenceHash>* sequences, |
| 170 base::hash_set<uint32_t>* valid_id_namespaces) { | 170 std::unordered_set<uint32_t>* valid_id_namespaces) { |
| 171 destruction_dependencies_.erase( | 171 destruction_dependencies_.erase( |
| 172 std::remove_if(destruction_dependencies_.begin(), | 172 std::remove_if(destruction_dependencies_.begin(), |
| 173 destruction_dependencies_.end(), | 173 destruction_dependencies_.end(), |
| 174 [sequences, valid_id_namespaces](SurfaceSequence seq) { | 174 [sequences, valid_id_namespaces](SurfaceSequence seq) { |
| 175 return (!!sequences->erase(seq) || | 175 return (!!sequences->erase(seq) || |
| 176 !valid_id_namespaces->count(seq.id_namespace)); | 176 !valid_id_namespaces->count(seq.id_namespace)); |
| 177 }), | 177 }), |
| 178 destruction_dependencies_.end()); | 178 destruction_dependencies_.end()); |
| 179 } | 179 } |
| 180 | 180 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 210 if (current_frame_) { | 210 if (current_frame_) { |
| 211 for (const auto& render_pass : | 211 for (const auto& render_pass : |
| 212 current_frame_->delegated_frame_data->render_pass_list) { | 212 current_frame_->delegated_frame_data->render_pass_list) { |
| 213 for (const auto& copy_request : render_pass->copy_requests) | 213 for (const auto& copy_request : render_pass->copy_requests) |
| 214 copy_request->SendEmptyResult(); | 214 copy_request->SendEmptyResult(); |
| 215 } | 215 } |
| 216 } | 216 } |
| 217 } | 217 } |
| 218 | 218 |
| 219 } // namespace cc | 219 } // namespace cc |
| OLD | NEW |