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 #ifndef UI_COMPOSITOR_COMPOSITOR_H_ | 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_ |
6 #define UI_COMPOSITOR_COMPOSITOR_H_ | 6 #define UI_COMPOSITOR_COMPOSITOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // Sets the background color used for areas that aren't covered by | 185 // Sets the background color used for areas that aren't covered by |
186 // the |root_layer|. | 186 // the |root_layer|. |
187 void SetBackgroundColor(SkColor color); | 187 void SetBackgroundColor(SkColor color); |
188 | 188 |
189 // Returns the widget for this compositor. | 189 // Returns the widget for this compositor. |
190 gfx::AcceleratedWidget widget() const { return widget_; } | 190 gfx::AcceleratedWidget widget() const { return widget_; } |
191 | 191 |
192 // Returns the vsync manager for this compositor. | 192 // Returns the vsync manager for this compositor. |
193 scoped_refptr<CompositorVSyncManager> vsync_manager() const; | 193 scoped_refptr<CompositorVSyncManager> vsync_manager() const; |
194 | 194 |
| 195 scoped_refptr<base::SingleThreadTaskRunner> task_runner() const { |
| 196 return task_runner_; |
| 197 } |
| 198 |
195 // Compositor does not own observers. It is the responsibility of the | 199 // Compositor does not own observers. It is the responsibility of the |
196 // observer to remove itself when it is done observing. | 200 // observer to remove itself when it is done observing. |
197 void AddObserver(CompositorObserver* observer); | 201 void AddObserver(CompositorObserver* observer); |
198 void RemoveObserver(CompositorObserver* observer); | 202 void RemoveObserver(CompositorObserver* observer); |
199 bool HasObserver(CompositorObserver* observer); | 203 bool HasObserver(CompositorObserver* observer); |
200 | 204 |
201 void AddAnimationObserver(CompositorAnimationObserver* observer); | 205 void AddAnimationObserver(CompositorAnimationObserver* observer); |
202 void RemoveAnimationObserver(CompositorAnimationObserver* observer); | 206 void RemoveAnimationObserver(CompositorAnimationObserver* observer); |
203 bool HasAnimationObserver(CompositorAnimationObserver* observer); | 207 bool HasAnimationObserver(CompositorAnimationObserver* observer); |
204 | 208 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 LayerAnimatorCollection layer_animator_collection_; | 310 LayerAnimatorCollection layer_animator_collection_; |
307 | 311 |
308 base::WeakPtrFactory<Compositor> schedule_draw_factory_; | 312 base::WeakPtrFactory<Compositor> schedule_draw_factory_; |
309 | 313 |
310 DISALLOW_COPY_AND_ASSIGN(Compositor); | 314 DISALLOW_COPY_AND_ASSIGN(Compositor); |
311 }; | 315 }; |
312 | 316 |
313 } // namespace ui | 317 } // namespace ui |
314 | 318 |
315 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 319 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |