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" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
14 #include "base/threading/thread_restrictions.h" | 14 #include "base/threading/thread_restrictions.h" |
| 15 #include "cc/font_atlas.h" |
15 #include "cc/input_handler.h" | 16 #include "cc/input_handler.h" |
16 #include "cc/layer.h" | 17 #include "cc/layer.h" |
17 #include "cc/layer_tree_host.h" | 18 #include "cc/layer_tree_host.h" |
18 #include "cc/thread_impl.h" | 19 #include "cc/thread_impl.h" |
19 #include "third_party/skia/include/core/SkBitmap.h" | 20 #include "third_party/skia/include/core/SkBitmap.h" |
20 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutput
Surface.h" | 21 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutput
Surface.h" |
21 #include "ui/compositor/compositor_observer.h" | 22 #include "ui/compositor/compositor_observer.h" |
22 #include "ui/compositor/compositor_switches.h" | 23 #include "ui/compositor/compositor_switches.h" |
23 #include "ui/compositor/dip_util.h" | 24 #include "ui/compositor/dip_util.h" |
24 #include "ui/compositor/layer.h" | 25 #include "ui/compositor/layer.h" |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 void Compositor::didCompleteSwapBuffers() { | 537 void Compositor::didCompleteSwapBuffers() { |
537 DCHECK(g_compositor_thread); | 538 DCHECK(g_compositor_thread); |
538 NotifyEnd(); | 539 NotifyEnd(); |
539 } | 540 } |
540 | 541 |
541 void Compositor::scheduleComposite() { | 542 void Compositor::scheduleComposite() { |
542 if (!disable_schedule_composite_) | 543 if (!disable_schedule_composite_) |
543 ScheduleDraw(); | 544 ScheduleDraw(); |
544 } | 545 } |
545 | 546 |
| 547 scoped_ptr<cc::FontAtlas> Compositor::createFontAtlas() { |
| 548 return scoped_ptr<cc::FontAtlas>(); |
| 549 } |
| 550 |
546 scoped_refptr<CompositorLock> Compositor::GetCompositorLock() { | 551 scoped_refptr<CompositorLock> Compositor::GetCompositorLock() { |
547 if (!compositor_lock_) { | 552 if (!compositor_lock_) { |
548 compositor_lock_ = new CompositorLock(this); | 553 compositor_lock_ = new CompositorLock(this); |
549 if (g_compositor_thread) | 554 if (g_compositor_thread) |
550 host_->setDeferCommits(true); | 555 host_->setDeferCommits(true); |
551 FOR_EACH_OBSERVER(CompositorObserver, | 556 FOR_EACH_OBSERVER(CompositorObserver, |
552 observer_list_, | 557 observer_list_, |
553 OnCompositingLockStateChanged(this)); | 558 OnCompositingLockStateChanged(this)); |
554 } | 559 } |
555 return compositor_lock_; | 560 return compositor_lock_; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 | 597 |
593 COMPOSITOR_EXPORT void DisableTestCompositor() { | 598 COMPOSITOR_EXPORT void DisableTestCompositor() { |
594 test_compositor_enabled = false; | 599 test_compositor_enabled = false; |
595 } | 600 } |
596 | 601 |
597 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { | 602 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { |
598 return test_compositor_enabled; | 603 return test_compositor_enabled; |
599 } | 604 } |
600 | 605 |
601 } // namespace ui | 606 } // namespace ui |
OLD | NEW |