| 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 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_H_ | 5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_H_ |
| 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_ | 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 virtual Texture* CreateTexture() = 0; | 111 virtual Texture* CreateTexture() = 0; |
| 112 | 112 |
| 113 // Blurs the specific region in the compositor. | 113 // Blurs the specific region in the compositor. |
| 114 virtual void Blur(const gfx::Rect& bounds) = 0; | 114 virtual void Blur(const gfx::Rect& bounds) = 0; |
| 115 | 115 |
| 116 // Schedules a redraw of the layer tree associated with this compositor. | 116 // Schedules a redraw of the layer tree associated with this compositor. |
| 117 virtual void ScheduleDraw(); | 117 virtual void ScheduleDraw(); |
| 118 | 118 |
| 119 // Sets the root of the layer tree drawn by this Compositor. | 119 // Sets the root of the layer tree drawn by this Compositor. |
| 120 // The Compositor does not own the root layer. | 120 // The Compositor does not own the root layer. |
| 121 const Layer* root_layer() const { return root_layer_; } |
| 121 Layer* root_layer() { return root_layer_; } | 122 Layer* root_layer() { return root_layer_; } |
| 122 void SetRootLayer(Layer* root_layer); | 123 void SetRootLayer(Layer* root_layer); |
| 123 | 124 |
| 124 // Draws the scene created by the layer tree and any visual effects. If | 125 // Draws the scene created by the layer tree and any visual effects. If |
| 125 // |force_clear| is true, this will cause the compositor to clear before | 126 // |force_clear| is true, this will cause the compositor to clear before |
| 126 // compositing. | 127 // compositing. |
| 127 void Draw(bool force_clear); | 128 void Draw(bool force_clear); |
| 128 | 129 |
| 129 // Notifies the compositor that the size of the widget that it is | 130 // Notifies the compositor that the size of the widget that it is |
| 130 // drawing to has changed. | 131 // drawing to has changed. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // calls to it. | 192 // calls to it. |
| 192 static ui::Compositor*(*compositor_factory_)( | 193 static ui::Compositor*(*compositor_factory_)( |
| 193 ui::CompositorDelegate* delegate); | 194 ui::CompositorDelegate* delegate); |
| 194 | 195 |
| 195 friend class base::RefCounted<Compositor>; | 196 friend class base::RefCounted<Compositor>; |
| 196 }; | 197 }; |
| 197 | 198 |
| 198 } // namespace ui | 199 } // namespace ui |
| 199 | 200 |
| 200 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ | 201 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ |
| OLD | NEW |