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

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

Issue 914403003: cc: Add main frame timing info to frame timing tracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 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_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 10
(...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 *resource_pool = ResourcePool::Create( 2113 *resource_pool = ResourcePool::Create(
2114 resource_provider_.get(), GL_TEXTURE_2D); 2114 resource_provider_.get(), GL_TEXTURE_2D);
2115 2115
2116 *tile_task_worker_pool = PixelBufferTileTaskWorkerPool::Create( 2116 *tile_task_worker_pool = PixelBufferTileTaskWorkerPool::Create(
2117 task_runner, task_graph_runner_, context_provider, 2117 task_runner, task_graph_runner_, context_provider,
2118 resource_provider_.get(), 2118 resource_provider_.get(),
2119 GetMaxTransferBufferUsageBytes(context_provider->ContextCapabilities(), 2119 GetMaxTransferBufferUsageBytes(context_provider->ContextCapabilities(),
2120 settings_.renderer_settings.refresh_rate)); 2120 settings_.renderer_settings.refresh_rate));
2121 } 2121 }
2122 2122
2123 void LayerTreeHostImpl::RecordMainFrameTiming(
2124 const BeginFrameArgs& start_of_main_frame_args,
2125 const BeginFrameArgs& expected_next_main_frame_args) {
2126 std::vector<int64_t> request_ids;
2127 active_tree_->GatherFrameTimingRequestIds(&request_ids);
2128 if (request_ids.empty())
2129 return;
2130
2131 base::TimeTicks start_time = start_of_main_frame_args.frame_time;
2132 base::TimeTicks end_time = expected_next_main_frame_args.frame_time;
2133 frame_timing_tracker_->SaveMainFrameTimeStamps(
2134 request_ids, start_time, end_time, active_tree_->source_frame_number());
2135 }
2136
2123 void LayerTreeHostImpl::DestroyTileManager() { 2137 void LayerTreeHostImpl::DestroyTileManager() {
2124 tile_manager_ = nullptr; 2138 tile_manager_ = nullptr;
2125 resource_pool_ = nullptr; 2139 resource_pool_ = nullptr;
2126 staging_resource_pool_ = nullptr; 2140 staging_resource_pool_ = nullptr;
2127 tile_task_worker_pool_ = nullptr; 2141 tile_task_worker_pool_ = nullptr;
2128 rasterizer_ = nullptr; 2142 rasterizer_ = nullptr;
2129 single_thread_synchronous_task_graph_runner_ = nullptr; 2143 single_thread_synchronous_task_graph_runner_ = nullptr;
2130 } 2144 }
2131 2145
2132 bool LayerTreeHostImpl::IsSynchronousSingleThreaded() const { 2146 bool LayerTreeHostImpl::IsSynchronousSingleThreaded() const {
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after
3430 new_target.SetToMin(layer_impl->MaxScrollOffset()); 3444 new_target.SetToMin(layer_impl->MaxScrollOffset());
3431 3445
3432 curve->UpdateTarget( 3446 curve->UpdateTarget(
3433 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) 3447 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time)
3434 .InSecondsF(), 3448 .InSecondsF(),
3435 new_target); 3449 new_target);
3436 3450
3437 return true; 3451 return true;
3438 } 3452 }
3439 } // namespace cc 3453 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698