| 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 } | 378 } |
| 379 | 379 |
| 380 void Compositor::SetVisible(bool visible) { | 380 void Compositor::SetVisible(bool visible) { |
| 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 bool Compositor::ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) { |
| 389 return host_->GetInputHandler()->ScrollLayerTo(layer_id, offset); |
| 390 } |
| 391 |
| 392 bool Compositor::GetScrollOffsetForLayer(int layer_id, |
| 393 gfx::ScrollOffset* offset) const { |
| 394 return host_->GetInputHandler()->GetScrollOffsetForLayer(layer_id, offset); |
| 395 } |
| 396 |
| 388 void Compositor::SetAuthoritativeVSyncInterval( | 397 void Compositor::SetAuthoritativeVSyncInterval( |
| 389 const base::TimeDelta& interval) { | 398 const base::TimeDelta& interval) { |
| 390 context_factory_->SetAuthoritativeVSyncInterval(this, interval); | 399 context_factory_->SetAuthoritativeVSyncInterval(this, interval); |
| 391 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 400 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 392 cc::switches::kDisableBeginFrameScheduling)) { | 401 cc::switches::kDisableBeginFrameScheduling)) { |
| 393 vsync_manager_->SetAuthoritativeVSyncInterval(interval); | 402 vsync_manager_->SetAuthoritativeVSyncInterval(interval); |
| 394 } | 403 } |
| 395 } | 404 } |
| 396 | 405 |
| 397 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { | 406 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 observer_list_, | 578 observer_list_, |
| 570 OnCompositingLockStateChanged(this)); | 579 OnCompositingLockStateChanged(this)); |
| 571 } | 580 } |
| 572 | 581 |
| 573 void Compositor::CancelCompositorLock() { | 582 void Compositor::CancelCompositorLock() { |
| 574 if (compositor_lock_) | 583 if (compositor_lock_) |
| 575 compositor_lock_->CancelLock(); | 584 compositor_lock_->CancelLock(); |
| 576 } | 585 } |
| 577 | 586 |
| 578 } // namespace ui | 587 } // namespace ui |
| OLD | NEW |