| 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 host_->SetVisible(visible); | 381 host_->SetVisible(visible); |
| 382 } | 382 } |
| 383 | 383 |
| 384 bool Compositor::IsVisible() { | 384 bool Compositor::IsVisible() { |
| 385 return host_->visible(); | 385 return host_->visible(); |
| 386 } | 386 } |
| 387 | 387 |
| 388 void Compositor::SetAuthoritativeVSyncInterval( | 388 void Compositor::SetAuthoritativeVSyncInterval( |
| 389 const base::TimeDelta& interval) { | 389 const base::TimeDelta& interval) { |
| 390 context_factory_->SetAuthoritativeVSyncInterval(this, interval); | 390 context_factory_->SetAuthoritativeVSyncInterval(this, interval); |
| 391 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 391 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 392 cc::switches::kEnableBeginFrameScheduling)) { | 392 cc::switches::kDisableBeginFrameScheduling)) { |
| 393 vsync_manager_->SetAuthoritativeVSyncInterval(interval); | 393 vsync_manager_->SetAuthoritativeVSyncInterval(interval); |
| 394 } | 394 } |
| 395 } | 395 } |
| 396 | 396 |
| 397 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { | 397 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { |
| 398 // This function should only get called once. | 398 // This function should only get called once. |
| 399 DCHECK(!widget_valid_); | 399 DCHECK(!widget_valid_); |
| 400 widget_ = widget; | 400 widget_ = widget; |
| 401 widget_valid_ = true; | 401 widget_valid_ = true; |
| 402 if (output_surface_requested_) | 402 if (output_surface_requested_) |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 observer_list_, | 558 observer_list_, |
| 559 OnCompositingLockStateChanged(this)); | 559 OnCompositingLockStateChanged(this)); |
| 560 } | 560 } |
| 561 | 561 |
| 562 void Compositor::CancelCompositorLock() { | 562 void Compositor::CancelCompositorLock() { |
| 563 if (compositor_lock_) | 563 if (compositor_lock_) |
| 564 compositor_lock_->CancelLock(); | 564 compositor_lock_->CancelLock(); |
| 565 } | 565 } |
| 566 | 566 |
| 567 } // namespace ui | 567 } // namespace ui |
| OLD | NEW |