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 <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 | 424 |
425 const cc::LayerTreeDebugState& Compositor::GetLayerTreeDebugState() const { | 425 const cc::LayerTreeDebugState& Compositor::GetLayerTreeDebugState() const { |
426 return host_->debug_state(); | 426 return host_->debug_state(); |
427 } | 427 } |
428 | 428 |
429 void Compositor::SetLayerTreeDebugState( | 429 void Compositor::SetLayerTreeDebugState( |
430 const cc::LayerTreeDebugState& debug_state) { | 430 const cc::LayerTreeDebugState& debug_state) { |
431 host_->SetDebugState(debug_state); | 431 host_->SetDebugState(debug_state); |
432 } | 432 } |
433 | 433 |
| 434 const cc::LayerTreeSettings& Compositor::GetLayerTreeSettings() const { |
| 435 return host_->settings(); |
| 436 } |
| 437 |
434 cc::SurfaceSequence Compositor::InsertSurfaceSequenceForNextFrame() { | 438 cc::SurfaceSequence Compositor::InsertSurfaceSequenceForNextFrame() { |
435 cc::SurfaceSequence sequence; | 439 cc::SurfaceSequence sequence; |
436 sequence.id_namespace = surface_id_allocator_->id_namespace(); | 440 sequence.id_namespace = surface_id_allocator_->id_namespace(); |
437 sequence.sequence = ++surface_sequence_number_; | 441 sequence.sequence = ++surface_sequence_number_; |
438 scoped_ptr<cc::SwapPromise> promise( | 442 scoped_ptr<cc::SwapPromise> promise( |
439 new SatisfySwapPromise(surface_sequence_number_)); | 443 new SatisfySwapPromise(surface_sequence_number_)); |
440 host_->QueueSwapPromise(promise.Pass()); | 444 host_->QueueSwapPromise(promise.Pass()); |
441 return sequence; | 445 return sequence; |
442 } | 446 } |
443 | 447 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 // Call ScheduleDraw() instead of Draw() in order to allow other | 482 // Call ScheduleDraw() instead of Draw() in order to allow other |
479 // CompositorObservers to be notified before starting another | 483 // CompositorObservers to be notified before starting another |
480 // draw cycle. | 484 // draw cycle. |
481 ScheduleDraw(); | 485 ScheduleDraw(); |
482 } | 486 } |
483 FOR_EACH_OBSERVER( | 487 FOR_EACH_OBSERVER( |
484 CompositorObserver, observer_list_, OnCompositingEnded(this)); | 488 CompositorObserver, observer_list_, OnCompositingEnded(this)); |
485 } | 489 } |
486 | 490 |
487 } // namespace ui | 491 } // namespace ui |
OLD | NEW |