| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 // Gets the surface manager. | 120 // Gets the surface manager. |
| 121 virtual cc::SurfaceManager* GetSurfaceManager() = 0; | 121 virtual cc::SurfaceManager* GetSurfaceManager() = 0; |
| 122 | 122 |
| 123 // Resize the display corresponding to this compositor to a particular size. | 123 // Resize the display corresponding to this compositor to a particular size. |
| 124 virtual void ResizeDisplay(ui::Compositor* compositor, | 124 virtual void ResizeDisplay(ui::Compositor* compositor, |
| 125 const gfx::Size& size) = 0; | 125 const gfx::Size& size) = 0; |
| 126 | 126 |
| 127 virtual void SetAuthoritativeVSyncInterval(ui::Compositor* compositor, | 127 virtual void SetAuthoritativeVSyncInterval(ui::Compositor* compositor, |
| 128 base::TimeDelta interval) = 0; | 128 base::TimeDelta interval) = 0; |
| 129 |
| 130 virtual void SetOutputIsSecure(Compositor* compositor, bool secure) = 0; |
| 129 }; | 131 }; |
| 130 | 132 |
| 131 // This class represents a lock on the compositor, that can be used to prevent | 133 // This class represents a lock on the compositor, that can be used to prevent |
| 132 // commits to the compositor tree while we're waiting for an asynchronous | 134 // commits to the compositor tree while we're waiting for an asynchronous |
| 133 // event. The typical use case is when waiting for a renderer to produce a frame | 135 // event. The typical use case is when waiting for a renderer to produce a frame |
| 134 // at the right size. The caller keeps a reference on this object, and drops the | 136 // at the right size. The caller keeps a reference on this object, and drops the |
| 135 // reference once it desires to release the lock. | 137 // reference once it desires to release the lock. |
| 136 // By default, the lock will be cancelled after a short timeout to ensure | 138 // By default, the lock will be cancelled after a short timeout to ensure |
| 137 // responsiveness of the UI, so the compositor tree should be kept in a | 139 // responsiveness of the UI, so the compositor tree should be kept in a |
| 138 // "reasonable" state while the lock is held. If the compositor sets | 140 // "reasonable" state while the lock is held. If the compositor sets |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 scoped_refptr<cc::AnimationTimeline> animation_timeline_; | 376 scoped_refptr<cc::AnimationTimeline> animation_timeline_; |
| 375 | 377 |
| 376 base::WeakPtrFactory<Compositor> weak_ptr_factory_; | 378 base::WeakPtrFactory<Compositor> weak_ptr_factory_; |
| 377 | 379 |
| 378 DISALLOW_COPY_AND_ASSIGN(Compositor); | 380 DISALLOW_COPY_AND_ASSIGN(Compositor); |
| 379 }; | 381 }; |
| 380 | 382 |
| 381 } // namespace ui | 383 } // namespace ui |
| 382 | 384 |
| 383 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 385 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
| OLD | NEW |