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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 74dc211045a01d8f229ce22cd0ab28ab45af6cb1..13e66807a3cf86ebf1be560fa430cacae0f6c688 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -814,9 +814,7 @@ bool LayerTreeHost::DoUpdateLayers(Layer* root_layer) {
}
void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) {
- ScopedPtrVector<SwapPromise>::iterator it = info->swap_promises.begin();
- for (; it != info->swap_promises.end(); ++it) {
- scoped_ptr<SwapPromise> swap_promise(info->swap_promises.take(it));
+ for (auto& swap_promise : info->swap_promises) {
TRACE_EVENT_WITH_FLOW1("input,benchmark",
"LatencyInfo.Flow",
TRACE_ID_DONT_MANGLE(swap_promise->TraceId()),
@@ -1030,13 +1028,13 @@ void LayerTreeHost::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) {
}
void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
- for (auto* swap_promise : swap_promise_list_)
+ for (const auto& swap_promise : swap_promise_list_)
swap_promise->DidNotSwap(reason);
swap_promise_list_.clear();
}
void LayerTreeHost::OnCommitForSwapPromises() {
- for (auto* swap_promise : swap_promise_list_)
+ for (const auto& swap_promise : swap_promise_list_)
swap_promise->OnCommit();
}
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698