| 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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 | 662 |
| 663 void Compositor::Layout() { | 663 void Compositor::Layout() { |
| 664 // We're sending damage that will be addressed during this composite | 664 // We're sending damage that will be addressed during this composite |
| 665 // cycle, so we don't need to schedule another composite to address it. | 665 // cycle, so we don't need to schedule another composite to address it. |
| 666 disable_schedule_composite_ = true; | 666 disable_schedule_composite_ = true; |
| 667 if (root_layer_) | 667 if (root_layer_) |
| 668 root_layer_->SendDamagedRects(); | 668 root_layer_->SendDamagedRects(); |
| 669 disable_schedule_composite_ = false; | 669 disable_schedule_composite_ = false; |
| 670 } | 670 } |
| 671 | 671 |
| 672 scoped_ptr<cc::OutputSurface> Compositor::CreateOutputSurface() { | 672 scoped_ptr<cc::OutputSurface> Compositor::CreateOutputSurface(bool fallback) { |
| 673 return ContextFactory::GetInstance()->CreateOutputSurface(this); | 673 return ContextFactory::GetInstance()->CreateOutputSurface(this); |
| 674 } | 674 } |
| 675 | 675 |
| 676 void Compositor::DidCommit() { | 676 void Compositor::DidCommit() { |
| 677 DCHECK(!IsLocked()); | 677 DCHECK(!IsLocked()); |
| 678 FOR_EACH_OBSERVER(CompositorObserver, | 678 FOR_EACH_OBSERVER(CompositorObserver, |
| 679 observer_list_, | 679 observer_list_, |
| 680 OnCompositingDidCommit(this)); | 680 OnCompositingDidCommit(this)); |
| 681 } | 681 } |
| 682 | 682 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 COMPOSITOR_EXPORT void DisableTestCompositor() { | 768 COMPOSITOR_EXPORT void DisableTestCompositor() { |
| 769 ResetImplicitFactory(); | 769 ResetImplicitFactory(); |
| 770 g_test_compositor_enabled = false; | 770 g_test_compositor_enabled = false; |
| 771 } | 771 } |
| 772 | 772 |
| 773 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { | 773 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { |
| 774 return g_test_compositor_enabled; | 774 return g_test_compositor_enabled; |
| 775 } | 775 } |
| 776 | 776 |
| 777 } // namespace ui | 777 } // namespace ui |
| OLD | NEW |