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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // The "authoritative" vsync interval, if provided, will override interval | 224 // The "authoritative" vsync interval, if provided, will override interval |
225 // reported from 3D context. This is typically the value reported by a more | 225 // reported from 3D context. This is typically the value reported by a more |
226 // reliable source, e.g, the platform display configuration. | 226 // reliable source, e.g, the platform display configuration. |
227 // In the particular case of ChromeOS -- this is the value queried through | 227 // In the particular case of ChromeOS -- this is the value queried through |
228 // XRandR, which is more reliable than the value queried through the 3D | 228 // XRandR, which is more reliable than the value queried through the 3D |
229 // context. | 229 // context. |
230 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); | 230 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); |
231 | 231 |
232 // Sets the widget for the compositor to render into. | 232 // Sets the widget for the compositor to render into. |
233 void SetAcceleratedWidget(gfx::AcceleratedWidget widget); | 233 void SetAcceleratedWidget(gfx::AcceleratedWidget widget); |
| 234 // Releases the widget previously set through SetAcceleratedWidget(). |
| 235 // After returning it will not be used for rendering anymore. |
| 236 // The compositor must be set to invisible when taking away a widget. |
| 237 gfx::AcceleratedWidget ReleaseAcceleratedWidget(); |
234 gfx::AcceleratedWidget widget() const; | 238 gfx::AcceleratedWidget widget() const; |
235 | 239 |
236 // Returns the vsync manager for this compositor. | 240 // Returns the vsync manager for this compositor. |
237 scoped_refptr<CompositorVSyncManager> vsync_manager() const; | 241 scoped_refptr<CompositorVSyncManager> vsync_manager() const; |
238 | 242 |
239 // Returns the main thread task runner this compositor uses. Users of the | 243 // Returns the main thread task runner this compositor uses. Users of the |
240 // compositor generally shouldn't use this. | 244 // compositor generally shouldn't use this. |
241 scoped_refptr<base::SingleThreadTaskRunner> task_runner() const { | 245 scoped_refptr<base::SingleThreadTaskRunner> task_runner() const { |
242 return task_runner_; | 246 return task_runner_; |
243 } | 247 } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 cc::BeginFrameArgs missed_begin_frame_args_; | 373 cc::BeginFrameArgs missed_begin_frame_args_; |
370 | 374 |
371 base::WeakPtrFactory<Compositor> weak_ptr_factory_; | 375 base::WeakPtrFactory<Compositor> weak_ptr_factory_; |
372 | 376 |
373 DISALLOW_COPY_AND_ASSIGN(Compositor); | 377 DISALLOW_COPY_AND_ASSIGN(Compositor); |
374 }; | 378 }; |
375 | 379 |
376 } // namespace ui | 380 } // namespace ui |
377 | 381 |
378 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 382 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |