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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset); | 280 bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset); |
281 | 281 |
282 // The "authoritative" vsync interval, if provided, will override interval | 282 // The "authoritative" vsync interval, if provided, will override interval |
283 // reported from 3D context. This is typically the value reported by a more | 283 // reported from 3D context. This is typically the value reported by a more |
284 // reliable source, e.g, the platform display configuration. | 284 // reliable source, e.g, the platform display configuration. |
285 // In the particular case of ChromeOS -- this is the value queried through | 285 // In the particular case of ChromeOS -- this is the value queried through |
286 // XRandR, which is more reliable than the value queried through the 3D | 286 // XRandR, which is more reliable than the value queried through the 3D |
287 // context. | 287 // context. |
288 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); | 288 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); |
289 | 289 |
| 290 // Most platforms set their vsync info via BrowerCompositorOutputSurface's |
| 291 // OnUpdateVSyncParametersFromGpu, but Mac routes vsync info via the |
| 292 // browser compositor instead through this path. |
| 293 void SetDisplayVSyncParameters(base::TimeTicks timebase, |
| 294 base::TimeDelta interval); |
| 295 |
290 // Sets the widget for the compositor to render into. | 296 // Sets the widget for the compositor to render into. |
291 void SetAcceleratedWidget(gfx::AcceleratedWidget widget); | 297 void SetAcceleratedWidget(gfx::AcceleratedWidget widget); |
292 // Releases the widget previously set through SetAcceleratedWidget(). | 298 // Releases the widget previously set through SetAcceleratedWidget(). |
293 // After returning it will not be used for rendering anymore. | 299 // After returning it will not be used for rendering anymore. |
294 // The compositor must be set to invisible when taking away a widget. | 300 // The compositor must be set to invisible when taking away a widget. |
295 gfx::AcceleratedWidget ReleaseAcceleratedWidget(); | 301 gfx::AcceleratedWidget ReleaseAcceleratedWidget(); |
296 gfx::AcceleratedWidget widget() const; | 302 gfx::AcceleratedWidget widget() const; |
297 | 303 |
298 #if defined(USE_AURA) | 304 #if defined(USE_AURA) |
299 // Sets the window for the compositor to render into on mus+ash. | 305 // Sets the window for the compositor to render into on mus+ash. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 scoped_refptr<cc::AnimationTimeline> animation_timeline_; | 435 scoped_refptr<cc::AnimationTimeline> animation_timeline_; |
430 | 436 |
431 base::WeakPtrFactory<Compositor> weak_ptr_factory_; | 437 base::WeakPtrFactory<Compositor> weak_ptr_factory_; |
432 | 438 |
433 DISALLOW_COPY_AND_ASSIGN(Compositor); | 439 DISALLOW_COPY_AND_ASSIGN(Compositor); |
434 }; | 440 }; |
435 | 441 |
436 } // namespace ui | 442 } // namespace ui |
437 | 443 |
438 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 444 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |