Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: cc/surfaces/surface.cc

Issue 1587283002: Switch cc to std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unordered-map
Patch Set: Fix MSVC build issue Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/surfaces/surface.h ('k') | cc/surfaces/surface_aggregator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/surfaces/surface.h ('k') | cc/surfaces/surface_aggregator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698