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

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 16871016: cc: Use BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@bfargs2
Patch Set: fix some tests; needs rebase; Created 7 years, 5 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 in_paint_layer_contents_ = false; 957 in_paint_layer_contents_ = false;
958 958
959 rendering_stats_instrumentation_->AddStats(stats); 959 rendering_stats_instrumentation_->AddStats(stats);
960 960
961 occlusion_tracker.overdraw_metrics()->RecordMetrics(this); 961 occlusion_tracker.overdraw_metrics()->RecordMetrics(this);
962 962
963 return need_more_updates; 963 return need_more_updates;
964 } 964 }
965 965
966 void LayerTreeHost::ApplyScrollAndScale(const ScrollAndScaleSet& info) { 966 void LayerTreeHost::ApplyScrollAndScale(const ScrollAndScaleSet& info) {
967 TRACE_EVENT0("cc", __PRETTY_FUNCTION__);
967 if (!root_layer_.get()) 968 if (!root_layer_.get())
968 return; 969 return;
969 970 TRACE_EVENT0("cc", __PRETTY_FUNCTION__);
970 Layer* root_scroll_layer = FindFirstScrollableLayer(root_layer_.get()); 971 Layer* root_scroll_layer = FindFirstScrollableLayer(root_layer_.get());
971 gfx::Vector2d root_scroll_delta; 972 gfx::Vector2d root_scroll_delta;
972 973
973 for (size_t i = 0; i < info.scrolls.size(); ++i) { 974 for (size_t i = 0; i < info.scrolls.size(); ++i) {
974 Layer* layer = 975 Layer* layer =
975 LayerTreeHostCommon::FindLayerInSubtree(root_layer_.get(), 976 LayerTreeHostCommon::FindLayerInSubtree(root_layer_.get(),
976 info.scrolls[i].layer_id); 977 info.scrolls[i].layer_id);
977 if (!layer) 978 if (!layer)
978 continue; 979 continue;
979 if (layer == root_scroll_layer) { 980 if (layer == root_scroll_layer) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 bool start_ready_animations = true; 1082 bool start_ready_animations = true;
1082 (*iter).second->UpdateState(start_ready_animations, NULL); 1083 (*iter).second->UpdateState(start_ready_animations, NULL);
1083 } 1084 }
1084 } 1085 }
1085 1086
1086 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { 1087 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() {
1087 return proxy_->CapturePicture(); 1088 return proxy_->CapturePicture();
1088 } 1089 }
1089 1090
1090 } // namespace cc 1091 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698