| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" | 5 #include "ui/compositor/compositor.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 } | 363 } |
| 364 | 364 |
| 365 void Compositor::SetAuthoritativeVSyncInterval( | 365 void Compositor::SetAuthoritativeVSyncInterval( |
| 366 const base::TimeDelta& interval) { | 366 const base::TimeDelta& interval) { |
| 367 context_factory_->SetAuthoritativeVSyncInterval(this, interval); | 367 context_factory_->SetAuthoritativeVSyncInterval(this, interval); |
| 368 vsync_manager_->SetAuthoritativeVSyncInterval(interval); | 368 vsync_manager_->SetAuthoritativeVSyncInterval(interval); |
| 369 } | 369 } |
| 370 | 370 |
| 371 void Compositor::SetDisplayVSyncParameters(base::TimeTicks timebase, | 371 void Compositor::SetDisplayVSyncParameters(base::TimeTicks timebase, |
| 372 base::TimeDelta interval) { | 372 base::TimeDelta interval) { |
| 373 // TODO: This shouldn't be needed anymore because the underlying |
| 374 // BeginFrameSource will also be updated via VSync Manager call below. |
| 373 context_factory_->SetDisplayVSyncParameters(this, timebase, interval); | 375 context_factory_->SetDisplayVSyncParameters(this, timebase, interval); |
| 374 vsync_manager_->UpdateVSyncParameters(timebase, interval); | 376 vsync_manager_->UpdateVSyncParameters(timebase, interval); |
| 375 } | 377 } |
| 376 | 378 |
| 377 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { | 379 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { |
| 378 // This function should only get called once. | 380 // This function should only get called once. |
| 379 DCHECK(!widget_valid_); | 381 DCHECK(!widget_valid_); |
| 380 widget_ = widget; | 382 widget_ = widget; |
| 381 widget_valid_ = true; | 383 widget_valid_ = true; |
| 382 if (compositor_frame_sink_requested_) | 384 if (compositor_frame_sink_requested_) |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 for (auto& observer : observer_list_) | 528 for (auto& observer : observer_list_) |
| 527 observer.OnCompositingLockStateChanged(this); | 529 observer.OnCompositingLockStateChanged(this); |
| 528 } | 530 } |
| 529 | 531 |
| 530 void Compositor::CancelCompositorLock() { | 532 void Compositor::CancelCompositorLock() { |
| 531 if (compositor_lock_) | 533 if (compositor_lock_) |
| 532 compositor_lock_->CancelLock(); | 534 compositor_lock_->CancelLock(); |
| 533 } | 535 } |
| 534 | 536 |
| 535 } // namespace ui | 537 } // namespace ui |
| OLD | NEW |