| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 class WebGraphicsContext3D; | 32 class WebGraphicsContext3D; |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace cc { | 35 namespace cc { |
| 36 class ContextProvider; | 36 class ContextProvider; |
| 37 class Layer; | 37 class Layer; |
| 38 class LayerTreeDebugState; | 38 class LayerTreeDebugState; |
| 39 class LayerTreeHost; | 39 class LayerTreeHost; |
| 40 class SharedBitmapManager; |
| 40 } | 41 } |
| 41 | 42 |
| 42 namespace gfx { | 43 namespace gfx { |
| 43 class Rect; | 44 class Rect; |
| 44 class Size; | 45 class Size; |
| 45 } | 46 } |
| 46 | 47 |
| 47 namespace ui { | 48 namespace ui { |
| 48 | 49 |
| 49 class Compositor; | 50 class Compositor; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient), | 171 NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient), |
| 171 public base::SupportsWeakPtr<Compositor> { | 172 public base::SupportsWeakPtr<Compositor> { |
| 172 public: | 173 public: |
| 173 explicit Compositor(gfx::AcceleratedWidget widget); | 174 explicit Compositor(gfx::AcceleratedWidget widget); |
| 174 virtual ~Compositor(); | 175 virtual ~Compositor(); |
| 175 | 176 |
| 176 static void Initialize(); | 177 static void Initialize(); |
| 177 static bool WasInitializedWithThread(); | 178 static bool WasInitializedWithThread(); |
| 178 static scoped_refptr<base::MessageLoopProxy> GetCompositorMessageLoop(); | 179 static scoped_refptr<base::MessageLoopProxy> GetCompositorMessageLoop(); |
| 179 static void Terminate(); | 180 static void Terminate(); |
| 181 static void SetSharedBitmapManager(cc::SharedBitmapManager* manager); |
| 180 | 182 |
| 181 // Schedules a redraw of the layer tree associated with this compositor. | 183 // Schedules a redraw of the layer tree associated with this compositor. |
| 182 void ScheduleDraw(); | 184 void ScheduleDraw(); |
| 183 | 185 |
| 184 // Sets the root of the layer tree drawn by this Compositor. The root layer | 186 // Sets the root of the layer tree drawn by this Compositor. The root layer |
| 185 // must have no parent. The compositor's root layer is reset if the root layer | 187 // must have no parent. The compositor's root layer is reset if the root layer |
| 186 // is destroyed. NULL can be passed to reset the root layer, in which case the | 188 // is destroyed. NULL can be passed to reset the root layer, in which case the |
| 187 // compositor will stop drawing anything. | 189 // compositor will stop drawing anything. |
| 188 // The Compositor does not own the root layer. | 190 // The Compositor does not own the root layer. |
| 189 const Layer* root_layer() const { return root_layer_; } | 191 const Layer* root_layer() const { return root_layer_; } |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 bool draw_on_compositing_end_; | 337 bool draw_on_compositing_end_; |
| 336 | 338 |
| 337 base::WeakPtrFactory<Compositor> schedule_draw_factory_; | 339 base::WeakPtrFactory<Compositor> schedule_draw_factory_; |
| 338 | 340 |
| 339 DISALLOW_COPY_AND_ASSIGN(Compositor); | 341 DISALLOW_COPY_AND_ASSIGN(Compositor); |
| 340 }; | 342 }; |
| 341 | 343 |
| 342 } // namespace ui | 344 } // namespace ui |
| 343 | 345 |
| 344 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 346 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
| OLD | NEW |