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/hash_tables.h" | 10 #include "base/hash_tables.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 // view hierarchy. | 215 // view hierarchy. |
216 class COMPOSITOR_EXPORT Compositor | 216 class COMPOSITOR_EXPORT Compositor |
217 : NON_EXPORTED_BASE(public cc::LayerTreeHostClient), | 217 : NON_EXPORTED_BASE(public cc::LayerTreeHostClient), |
218 public base::SupportsWeakPtr<Compositor> { | 218 public base::SupportsWeakPtr<Compositor> { |
219 public: | 219 public: |
220 Compositor(CompositorDelegate* delegate, | 220 Compositor(CompositorDelegate* delegate, |
221 gfx::AcceleratedWidget widget); | 221 gfx::AcceleratedWidget widget); |
222 virtual ~Compositor(); | 222 virtual ~Compositor(); |
223 | 223 |
224 static void Initialize(bool useThread); | 224 static void Initialize(bool useThread); |
| 225 static bool WasInitializedWithThread(); |
225 static void Terminate(); | 226 static void Terminate(); |
226 | 227 |
227 // Schedules a redraw of the layer tree associated with this compositor. | 228 // Schedules a redraw of the layer tree associated with this compositor. |
228 void ScheduleDraw(); | 229 void ScheduleDraw(); |
229 | 230 |
230 // Sets the root of the layer tree drawn by this Compositor. The root layer | 231 // Sets the root of the layer tree drawn by this Compositor. The root layer |
231 // must have no parent. The compositor's root layer is reset if the root layer | 232 // must have no parent. The compositor's root layer is reset if the root layer |
232 // is destroyed. NULL can be passed to reset the root layer, in which case the | 233 // is destroyed. NULL can be passed to reset the root layer, in which case the |
233 // compositor will stop drawing anything. | 234 // compositor will stop drawing anything. |
234 // The Compositor does not own the root layer. | 235 // The Compositor does not own the root layer. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 bool disable_schedule_composite_; | 363 bool disable_schedule_composite_; |
363 | 364 |
364 CompositorLock* compositor_lock_; | 365 CompositorLock* compositor_lock_; |
365 | 366 |
366 DISALLOW_COPY_AND_ASSIGN(Compositor); | 367 DISALLOW_COPY_AND_ASSIGN(Compositor); |
367 }; | 368 }; |
368 | 369 |
369 } // namespace ui | 370 } // namespace ui |
370 | 371 |
371 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 372 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |