| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // Sets the compositor's device scale factor and size. | 179 // Sets the compositor's device scale factor and size. |
| 180 void SetScaleAndSize(float scale, const gfx::Size& size_in_pixel); | 180 void SetScaleAndSize(float scale, const gfx::Size& size_in_pixel); |
| 181 | 181 |
| 182 // Returns the size of the widget that is being drawn to in pixel coordinates. | 182 // Returns the size of the widget that is being drawn to in pixel coordinates. |
| 183 const gfx::Size& size() const { return size_; } | 183 const gfx::Size& size() const { return size_; } |
| 184 | 184 |
| 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 // Set the visibility of the underlying compositor. |
| 190 void SetVisible(bool visible); |
| 191 |
| 189 // Returns the widget for this compositor. | 192 // Returns the widget for this compositor. |
| 190 gfx::AcceleratedWidget widget() const { return widget_; } | 193 gfx::AcceleratedWidget widget() const { return widget_; } |
| 191 | 194 |
| 192 // Returns the vsync manager for this compositor. | 195 // Returns the vsync manager for this compositor. |
| 193 scoped_refptr<CompositorVSyncManager> vsync_manager() const; | 196 scoped_refptr<CompositorVSyncManager> vsync_manager() const; |
| 194 | 197 |
| 195 // Returns the main thread task runner this compositor uses. Users of the | 198 // Returns the main thread task runner this compositor uses. Users of the |
| 196 // compositor generally shouldn't use this. | 199 // compositor generally shouldn't use this. |
| 197 scoped_refptr<base::SingleThreadTaskRunner> task_runner() const { | 200 scoped_refptr<base::SingleThreadTaskRunner> task_runner() const { |
| 198 return task_runner_; | 201 return task_runner_; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 LayerAnimatorCollection layer_animator_collection_; | 315 LayerAnimatorCollection layer_animator_collection_; |
| 313 | 316 |
| 314 base::WeakPtrFactory<Compositor> schedule_draw_factory_; | 317 base::WeakPtrFactory<Compositor> schedule_draw_factory_; |
| 315 | 318 |
| 316 DISALLOW_COPY_AND_ASSIGN(Compositor); | 319 DISALLOW_COPY_AND_ASSIGN(Compositor); |
| 317 }; | 320 }; |
| 318 | 321 |
| 319 } // namespace ui | 322 } // namespace ui |
| 320 | 323 |
| 321 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 324 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
| OLD | NEW |