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 | |
192 // Returns the widget for this compositor. | 189 // Returns the widget for this compositor. |
193 gfx::AcceleratedWidget widget() const { return widget_; } | 190 gfx::AcceleratedWidget widget() const { return widget_; } |
194 | 191 |
195 // Returns the vsync manager for this compositor. | 192 // Returns the vsync manager for this compositor. |
196 scoped_refptr<CompositorVSyncManager> vsync_manager() const; | 193 scoped_refptr<CompositorVSyncManager> vsync_manager() const; |
197 | 194 |
198 // Returns the main thread task runner this compositor uses. Users of the | 195 // Returns the main thread task runner this compositor uses. Users of the |
199 // compositor generally shouldn't use this. | 196 // compositor generally shouldn't use this. |
200 scoped_refptr<base::SingleThreadTaskRunner> task_runner() const { | 197 scoped_refptr<base::SingleThreadTaskRunner> task_runner() const { |
201 return task_runner_; | 198 return task_runner_; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 LayerAnimatorCollection layer_animator_collection_; | 312 LayerAnimatorCollection layer_animator_collection_; |
316 | 313 |
317 base::WeakPtrFactory<Compositor> schedule_draw_factory_; | 314 base::WeakPtrFactory<Compositor> schedule_draw_factory_; |
318 | 315 |
319 DISALLOW_COPY_AND_ASSIGN(Compositor); | 316 DISALLOW_COPY_AND_ASSIGN(Compositor); |
320 }; | 317 }; |
321 | 318 |
322 } // namespace ui | 319 } // namespace ui |
323 | 320 |
324 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 321 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |