OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2361 SetRequiresHighResToDraw(); | 2361 SetRequiresHighResToDraw(); |
2362 | 2362 |
2363 return true; | 2363 return true; |
2364 } | 2364 } |
2365 | 2365 |
2366 void LayerTreeHostImpl::CommitVSyncParameters(base::TimeTicks timebase, | 2366 void LayerTreeHostImpl::CommitVSyncParameters(base::TimeTicks timebase, |
2367 base::TimeDelta interval) { | 2367 base::TimeDelta interval) { |
2368 client_->CommitVSyncParameters(timebase, interval); | 2368 client_->CommitVSyncParameters(timebase, interval); |
2369 } | 2369 } |
2370 | 2370 |
| 2371 void LayerTreeHostImpl::SetBeginFrameSource(BeginFrameSource* source) { |
| 2372 client_->SetBeginFrameSource(source); |
| 2373 } |
| 2374 |
2371 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { | 2375 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { |
2372 if (device_viewport_size == device_viewport_size_) | 2376 if (device_viewport_size == device_viewport_size_) |
2373 return; | 2377 return; |
2374 TRACE_EVENT_INSTANT2("cc", "LayerTreeHostImpl::SetViewportSize", | 2378 TRACE_EVENT_INSTANT2("cc", "LayerTreeHostImpl::SetViewportSize", |
2375 TRACE_EVENT_SCOPE_THREAD, "width", | 2379 TRACE_EVENT_SCOPE_THREAD, "width", |
2376 device_viewport_size.width(), "height", | 2380 device_viewport_size.width(), "height", |
2377 device_viewport_size.height()); | 2381 device_viewport_size.height()); |
2378 | 2382 |
2379 if (pending_tree_) | 2383 if (pending_tree_) |
2380 active_tree_->SetViewportSizeInvalid(); | 2384 active_tree_->SetViewportSizeInvalid(); |
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3976 return task_runner_provider_->HasImplThread(); | 3980 return task_runner_provider_->HasImplThread(); |
3977 } | 3981 } |
3978 | 3982 |
3979 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3983 bool LayerTreeHostImpl::CommitToActiveTree() const { |
3980 // In single threaded mode we skip the pending tree and commit directly to the | 3984 // In single threaded mode we skip the pending tree and commit directly to the |
3981 // active tree. | 3985 // active tree. |
3982 return !task_runner_provider_->HasImplThread(); | 3986 return !task_runner_provider_->HasImplThread(); |
3983 } | 3987 } |
3984 | 3988 |
3985 } // namespace cc | 3989 } // namespace cc |
OLD | NEW |