OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gfx/compositor/compositor.h" | 5 #include "ui/gfx/compositor/compositor.h" |
6 | 6 |
7 #include "ui/gfx/compositor/compositor_observer.h" | 7 #include "ui/gfx/compositor/compositor_observer.h" |
8 #include "ui/gfx/compositor/layer.h" | 8 #include "ui/gfx/compositor/layer.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
11 | 11 |
12 TextureDrawParams::TextureDrawParams() | 12 TextureDrawParams::TextureDrawParams() |
13 : blend(false), | 13 : blend(false), |
14 has_valid_alpha_channel(false), | 14 has_valid_alpha_channel(false), |
15 opacity(1.0f), | 15 opacity(1.0f), |
16 vertically_flipped(false) { | 16 vertically_flipped(false) { |
17 } | 17 } |
18 | 18 |
| 19 // static |
| 20 Compositor*(*Compositor::compositor_factory_)(CompositorDelegate*) = NULL; |
| 21 |
19 Compositor::Compositor(CompositorDelegate* delegate, const gfx::Size& size) | 22 Compositor::Compositor(CompositorDelegate* delegate, const gfx::Size& size) |
20 : delegate_(delegate), | 23 : delegate_(delegate), |
21 size_(size), | 24 size_(size), |
22 root_layer_(NULL) { | 25 root_layer_(NULL) { |
23 } | 26 } |
24 | 27 |
25 Compositor::~Compositor() { | 28 Compositor::~Compositor() { |
26 } | 29 } |
27 | 30 |
28 void Compositor::ScheduleDraw() { | 31 void Compositor::ScheduleDraw() { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 73 } |
71 | 74 |
72 void Compositor::NotifyEnd() { | 75 void Compositor::NotifyEnd() { |
73 OnNotifyEnd(); | 76 OnNotifyEnd(); |
74 FOR_EACH_OBSERVER(CompositorObserver, | 77 FOR_EACH_OBSERVER(CompositorObserver, |
75 observer_list_, | 78 observer_list_, |
76 OnCompositingEnded(this)); | 79 OnCompositingEnded(this)); |
77 } | 80 } |
78 | 81 |
79 } // namespace ui | 82 } // namespace ui |
OLD | NEW |