| 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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 Compositor::OffscreenContextProviderForMainThread() { | 750 Compositor::OffscreenContextProviderForMainThread() { |
| 751 return ContextFactory::GetInstance()->OffscreenContextProviderForMainThread(); | 751 return ContextFactory::GetInstance()->OffscreenContextProviderForMainThread(); |
| 752 } | 752 } |
| 753 | 753 |
| 754 scoped_refptr<cc::ContextProvider> | 754 scoped_refptr<cc::ContextProvider> |
| 755 Compositor::OffscreenContextProviderForCompositorThread() { | 755 Compositor::OffscreenContextProviderForCompositorThread() { |
| 756 return ContextFactory::GetInstance()-> | 756 return ContextFactory::GetInstance()-> |
| 757 OffscreenContextProviderForCompositorThread(); | 757 OffscreenContextProviderForCompositorThread(); |
| 758 } | 758 } |
| 759 | 759 |
| 760 const cc::LayerTreeDebugState& Compositor::GetLayerTreeDebugState() const { |
| 761 return host_->debug_state(); |
| 762 } |
| 763 |
| 764 void Compositor::SetLayerTreeDebugState( |
| 765 const cc::LayerTreeDebugState& debug_state) { |
| 766 host_->SetDebugState(debug_state); |
| 767 } |
| 768 |
| 760 scoped_refptr<CompositorLock> Compositor::GetCompositorLock() { | 769 scoped_refptr<CompositorLock> Compositor::GetCompositorLock() { |
| 761 if (!compositor_lock_) { | 770 if (!compositor_lock_) { |
| 762 compositor_lock_ = new CompositorLock(this); | 771 compositor_lock_ = new CompositorLock(this); |
| 763 if (g_compositor_thread) | 772 if (g_compositor_thread) |
| 764 host_->SetDeferCommits(true); | 773 host_->SetDeferCommits(true); |
| 765 FOR_EACH_OBSERVER(CompositorObserver, | 774 FOR_EACH_OBSERVER(CompositorObserver, |
| 766 observer_list_, | 775 observer_list_, |
| 767 OnCompositingLockStateChanged(this)); | 776 OnCompositingLockStateChanged(this)); |
| 768 } | 777 } |
| 769 return compositor_lock_; | 778 return compositor_lock_; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 COMPOSITOR_EXPORT void DisableTestCompositor() { | 817 COMPOSITOR_EXPORT void DisableTestCompositor() { |
| 809 ResetImplicitFactory(); | 818 ResetImplicitFactory(); |
| 810 g_test_compositor_enabled = false; | 819 g_test_compositor_enabled = false; |
| 811 } | 820 } |
| 812 | 821 |
| 813 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { | 822 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { |
| 814 return g_test_compositor_enabled; | 823 return g_test_compositor_enabled; |
| 815 } | 824 } |
| 816 | 825 |
| 817 } // namespace ui | 826 } // namespace ui |
| OLD | NEW |