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

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

Issue 1137823002: Pass collected frame timing events to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed implementing virtual function on Android html_viewer. Created 5 years, 6 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/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('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 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_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 resourceless_software_draw_(false), 223 resourceless_software_draw_(false),
224 animation_registrar_(AnimationRegistrar::Create()), 224 animation_registrar_(AnimationRegistrar::Create()),
225 rendering_stats_instrumentation_(rendering_stats_instrumentation), 225 rendering_stats_instrumentation_(rendering_stats_instrumentation),
226 micro_benchmark_controller_(this), 226 micro_benchmark_controller_(this),
227 shared_bitmap_manager_(shared_bitmap_manager), 227 shared_bitmap_manager_(shared_bitmap_manager),
228 gpu_memory_buffer_manager_(gpu_memory_buffer_manager), 228 gpu_memory_buffer_manager_(gpu_memory_buffer_manager),
229 task_graph_runner_(task_graph_runner), 229 task_graph_runner_(task_graph_runner),
230 id_(id), 230 id_(id),
231 requires_high_res_to_draw_(false), 231 requires_high_res_to_draw_(false),
232 is_likely_to_require_a_draw_(false), 232 is_likely_to_require_a_draw_(false),
233 frame_timing_tracker_(FrameTimingTracker::Create()) { 233 frame_timing_tracker_(FrameTimingTracker::Create(this)) {
234 DCHECK(proxy_->IsImplThread()); 234 DCHECK(proxy_->IsImplThread());
235 DidVisibilityChange(this, visible_); 235 DidVisibilityChange(this, visible_);
236 animation_registrar_->set_supports_scroll_animations( 236 animation_registrar_->set_supports_scroll_animations(
237 proxy_->SupportsImplScrolling()); 237 proxy_->SupportsImplScrolling());
238 238
239 SetDebugState(settings.initial_debug_state); 239 SetDebugState(settings.initial_debug_state);
240 240
241 // LTHI always has an active tree. 241 // LTHI always has an active tree.
242 active_tree_ = 242 active_tree_ =
243 LayerTreeImpl::create(this, new SyncedProperty<ScaleGroup>(), 243 LayerTreeImpl::create(this, new SyncedProperty<ScaleGroup>(),
(...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after
2167 active_tree_->GatherFrameTimingRequestIds(&request_ids); 2167 active_tree_->GatherFrameTimingRequestIds(&request_ids);
2168 if (request_ids.empty()) 2168 if (request_ids.empty())
2169 return; 2169 return;
2170 2170
2171 base::TimeTicks start_time = start_of_main_frame_args.frame_time; 2171 base::TimeTicks start_time = start_of_main_frame_args.frame_time;
2172 base::TimeTicks end_time = expected_next_main_frame_args.frame_time; 2172 base::TimeTicks end_time = expected_next_main_frame_args.frame_time;
2173 frame_timing_tracker_->SaveMainFrameTimeStamps( 2173 frame_timing_tracker_->SaveMainFrameTimeStamps(
2174 request_ids, start_time, end_time, active_tree_->source_frame_number()); 2174 request_ids, start_time, end_time, active_tree_->source_frame_number());
2175 } 2175 }
2176 2176
2177 void LayerTreeHostImpl::PostFrameTimingEvents(
2178 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
2179 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
2180 client_->PostFrameTimingEventsOnImplThread(composite_events.Pass(),
2181 main_frame_events.Pass());
2182 }
2183
2177 void LayerTreeHostImpl::DestroyTileManager() { 2184 void LayerTreeHostImpl::DestroyTileManager() {
2178 tile_manager_ = nullptr; 2185 tile_manager_ = nullptr;
2179 resource_pool_ = nullptr; 2186 resource_pool_ = nullptr;
2180 staging_resource_pool_ = nullptr; 2187 staging_resource_pool_ = nullptr;
2181 tile_task_worker_pool_ = nullptr; 2188 tile_task_worker_pool_ = nullptr;
2182 single_thread_synchronous_task_graph_runner_ = nullptr; 2189 single_thread_synchronous_task_graph_runner_ = nullptr;
2183 } 2190 }
2184 2191
2185 bool LayerTreeHostImpl::IsSynchronousSingleThreaded() const { 2192 bool LayerTreeHostImpl::IsSynchronousSingleThreaded() const {
2186 return !proxy_->HasImplThread() && !settings_.single_thread_proxy_scheduler; 2193 return !proxy_->HasImplThread() && !settings_.single_thread_proxy_scheduler;
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after
3440 new_target.SetToMin(layer_impl->MaxScrollOffset()); 3447 new_target.SetToMin(layer_impl->MaxScrollOffset());
3441 3448
3442 curve->UpdateTarget( 3449 curve->UpdateTarget(
3443 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) 3450 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time)
3444 .InSecondsF(), 3451 .InSecondsF(),
3445 new_target); 3452 new_target);
3446 3453
3447 return true; 3454 return true;
3448 } 3455 }
3449 } // namespace cc 3456 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698