| 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 <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 // Sets the background color used for areas that aren't covered by | 213 // Sets the background color used for areas that aren't covered by |
| 214 // the |root_layer|. | 214 // the |root_layer|. |
| 215 void SetBackgroundColor(SkColor color); | 215 void SetBackgroundColor(SkColor color); |
| 216 | 216 |
| 217 // Sets the visibility of the underlying compositor. | 217 // Sets the visibility of the underlying compositor. |
| 218 void SetVisible(bool visible); | 218 void SetVisible(bool visible); |
| 219 | 219 |
| 220 // Gets the visibility of the underlying compositor. | 220 // Gets the visibility of the underlying compositor. |
| 221 bool IsVisible(); | 221 bool IsVisible(); |
| 222 | 222 |
| 223 // The "authoritative" vsync interval, if provided, will override interval |
| 224 // reported from 3D context. This is typically the value reported by a more |
| 225 // reliable source, e.g, the platform display configuration. |
| 226 // In the particular case of ChromeOS -- this is the value queried through |
| 227 // XRandR, which is more reliable than the value queried through the 3D |
| 228 // context. |
| 229 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); |
| 230 |
| 223 // Returns the widget for this compositor. | 231 // Returns the widget for this compositor. |
| 224 gfx::AcceleratedWidget widget() const { return widget_; } | 232 gfx::AcceleratedWidget widget() const { return widget_; } |
| 225 | 233 |
| 226 // Returns the vsync manager for this compositor. | 234 // Returns the vsync manager for this compositor. |
| 227 scoped_refptr<CompositorVSyncManager> vsync_manager() const; | 235 scoped_refptr<CompositorVSyncManager> vsync_manager() const; |
| 228 | 236 |
| 229 // Returns the main thread task runner this compositor uses. Users of the | 237 // Returns the main thread task runner this compositor uses. Users of the |
| 230 // compositor generally shouldn't use this. | 238 // compositor generally shouldn't use this. |
| 231 scoped_refptr<base::SingleThreadTaskRunner> task_runner() const { | 239 scoped_refptr<base::SingleThreadTaskRunner> task_runner() const { |
| 232 return task_runner_; | 240 return task_runner_; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 cc::BeginFrameArgs missed_begin_frame_args_; | 364 cc::BeginFrameArgs missed_begin_frame_args_; |
| 357 | 365 |
| 358 base::WeakPtrFactory<Compositor> weak_ptr_factory_; | 366 base::WeakPtrFactory<Compositor> weak_ptr_factory_; |
| 359 | 367 |
| 360 DISALLOW_COPY_AND_ASSIGN(Compositor); | 368 DISALLOW_COPY_AND_ASSIGN(Compositor); |
| 361 }; | 369 }; |
| 362 | 370 |
| 363 } // namespace ui | 371 } // namespace ui |
| 364 | 372 |
| 365 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 373 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
| OLD | NEW |