Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 #include "cc/base/switches.h" | 34 #include "cc/base/switches.h" |
| 35 #include "cc/benchmarks/micro_benchmark.h" | 35 #include "cc/benchmarks/micro_benchmark.h" |
| 36 #include "cc/blink/web_layer_impl.h" | 36 #include "cc/blink/web_layer_impl.h" |
| 37 #include "cc/debug/layer_tree_debug_state.h" | 37 #include "cc/debug/layer_tree_debug_state.h" |
| 38 #include "cc/input/layer_selection_bound.h" | 38 #include "cc/input/layer_selection_bound.h" |
| 39 #include "cc/layers/layer.h" | 39 #include "cc/layers/layer.h" |
| 40 #include "cc/output/begin_frame_args.h" | 40 #include "cc/output/begin_frame_args.h" |
| 41 #include "cc/output/copy_output_request.h" | 41 #include "cc/output/copy_output_request.h" |
| 42 #include "cc/output/copy_output_result.h" | 42 #include "cc/output/copy_output_result.h" |
| 43 #include "cc/output/latency_info_swap_promise.h" | 43 #include "cc/output/latency_info_swap_promise.h" |
| 44 #include "cc/output/report_time_swap_promise.h" | |
| 44 #include "cc/output/swap_promise.h" | 45 #include "cc/output/swap_promise.h" |
| 45 #include "cc/resources/single_release_callback.h" | 46 #include "cc/resources/single_release_callback.h" |
| 46 #include "cc/scheduler/begin_frame_source.h" | 47 #include "cc/scheduler/begin_frame_source.h" |
| 47 #include "cc/trees/latency_info_swap_promise_monitor.h" | 48 #include "cc/trees/latency_info_swap_promise_monitor.h" |
| 48 #include "cc/trees/layer_tree_host.h" | 49 #include "cc/trees/layer_tree_host.h" |
| 49 #include "cc/trees/layer_tree_mutator.h" | 50 #include "cc/trees/layer_tree_mutator.h" |
| 50 #include "content/common/content_switches_internal.h" | 51 #include "content/common/content_switches_internal.h" |
| 51 #include "content/common/layer_tree_settings_factory.h" | 52 #include "content/common/layer_tree_settings_factory.h" |
| 52 #include "content/public/common/content_client.h" | 53 #include "content/public/common/content_client.h" |
| 53 #include "content/public/common/content_switches.h" | 54 #include "content/public/common/content_switches.h" |
| (...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1148 | 1149 |
| 1149 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { | 1150 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { |
| 1150 layer_tree_host_->SetContentSourceId(id); | 1151 layer_tree_host_->SetContentSourceId(id); |
| 1151 } | 1152 } |
| 1152 | 1153 |
| 1153 void RenderWidgetCompositor::SetLocalSurfaceId( | 1154 void RenderWidgetCompositor::SetLocalSurfaceId( |
| 1154 const cc::LocalSurfaceId& local_surface_id) { | 1155 const cc::LocalSurfaceId& local_surface_id) { |
| 1155 layer_tree_host_->SetLocalSurfaceId(local_surface_id); | 1156 layer_tree_host_->SetLocalSurfaceId(local_surface_id); |
| 1156 } | 1157 } |
| 1157 | 1158 |
| 1159 void RenderWidgetCompositor::NotifySwapTime( | |
| 1160 base::Callback<void(bool, double)> callback) { | |
| 1161 QueueSwapPromise(base::MakeUnique<cc::ReportTimeSwapPromise>( | |
|
enne (OOO)
2017/05/01 21:58:11
Agreed with sunnyps that ReportSwapTimePromise cou
panicker
2017/05/02 00:57:04
Done.
| |
| 1162 std::move(callback), base::ThreadTaskRunnerHandle::Get())); | |
| 1163 } | |
| 1164 | |
| 1158 } // namespace content | 1165 } // namespace content |
| OLD | NEW |