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

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

Issue 1239593002: Implement a new flow event API that allows binding flow events and regular events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add support for flow steps. Created 5 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 #include <string> 9 #include <string>
10 10
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 return; 797 return;
798 798
799 LayerTreeHostCommon::CallFunctionForSubtree( 799 LayerTreeHostCommon::CallFunctionForSubtree(
800 root_layer(), [](Layer* layer) { layer->ReduceMemoryUsage(); }); 800 root_layer(), [](Layer* layer) { layer->ReduceMemoryUsage(); });
801 } 801 }
802 802
803 void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) { 803 void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) {
804 ScopedPtrVector<SwapPromise>::iterator it = info->swap_promises.begin(); 804 ScopedPtrVector<SwapPromise>::iterator it = info->swap_promises.begin();
805 for (; it != info->swap_promises.end(); ++it) { 805 for (; it != info->swap_promises.end(); ++it) {
806 scoped_ptr<SwapPromise> swap_promise(info->swap_promises.take(it)); 806 scoped_ptr<SwapPromise> swap_promise(info->swap_promises.take(it));
807 TRACE_EVENT_WITH_FLOW0("toplevel", "LayerTreeHost::ApplyScrollAndScale",
808 TRACE_ID_DONT_MANGLE(swap_promise->TraceId()),
809 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT) ;
807 TRACE_EVENT_FLOW_STEP0("input", 810 TRACE_EVENT_FLOW_STEP0("input",
808 "LatencyInfo.Flow", 811 "LatencyInfo.Flow",
809 TRACE_ID_DONT_MANGLE(swap_promise->TraceId()), 812 TRACE_ID_DONT_MANGLE(swap_promise->TraceId()),
810 "Main thread scroll update"); 813 "Main thread scroll update");
811 QueueSwapPromise(swap_promise.Pass()); 814 QueueSwapPromise(swap_promise.Pass());
812 } 815 }
813 816
814 gfx::Vector2dF inner_viewport_scroll_delta; 817 gfx::Vector2dF inner_viewport_scroll_delta;
815 gfx::Vector2dF outer_viewport_scroll_delta; 818 gfx::Vector2dF outer_viewport_scroll_delta;
816 819
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) 1195 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id())
1193 : false; 1196 : false;
1194 } 1197 }
1195 1198
1196 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { 1199 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const {
1197 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) 1200 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id())
1198 : false; 1201 : false;
1199 } 1202 }
1200 1203
1201 } // namespace cc 1204 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698