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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 void WillCommit() override {} | 262 void WillCommit() override {} |
263 void DidCommit() override; | 263 void DidCommit() override; |
264 void DidCommitAndDrawFrame() override; | 264 void DidCommitAndDrawFrame() override; |
265 void DidCompleteSwapBuffers() override; | 265 void DidCompleteSwapBuffers() override; |
266 void DidCompletePageScaleAnimation() override {} | 266 void DidCompletePageScaleAnimation() override {} |
267 | 267 |
268 // cc::LayerTreeHostSingleThreadClient implementation. | 268 // cc::LayerTreeHostSingleThreadClient implementation. |
269 void DidPostSwapBuffers() override; | 269 void DidPostSwapBuffers() override; |
270 void DidAbortSwapBuffers() override; | 270 void DidAbortSwapBuffers() override; |
271 | 271 |
| 272 void SetDeferCommits(bool defer_commits); |
272 bool IsLocked() { return compositor_lock_ != NULL; } | 273 bool IsLocked() { return compositor_lock_ != NULL; } |
273 | 274 |
274 const cc::LayerTreeDebugState& GetLayerTreeDebugState() const; | 275 const cc::LayerTreeDebugState& GetLayerTreeDebugState() const; |
275 void SetLayerTreeDebugState(const cc::LayerTreeDebugState& debug_state); | 276 void SetLayerTreeDebugState(const cc::LayerTreeDebugState& debug_state); |
276 const cc::RendererSettings& GetRendererSettings() const; | 277 const cc::RendererSettings& GetRendererSettings() const; |
277 | 278 |
278 LayerAnimatorCollection* layer_animator_collection() { | 279 LayerAnimatorCollection* layer_animator_collection() { |
279 return &layer_animator_collection_; | 280 return &layer_animator_collection_; |
280 } | 281 } |
281 | 282 |
(...skipping 30 matching lines...) Expand all Loading... |
312 // The manager of vsync parameters for this compositor. | 313 // The manager of vsync parameters for this compositor. |
313 scoped_refptr<CompositorVSyncManager> vsync_manager_; | 314 scoped_refptr<CompositorVSyncManager> vsync_manager_; |
314 | 315 |
315 // The device scale factor of the monitor that this compositor is compositing | 316 // The device scale factor of the monitor that this compositor is compositing |
316 // layers on. | 317 // layers on. |
317 float device_scale_factor_; | 318 float device_scale_factor_; |
318 | 319 |
319 int last_started_frame_; | 320 int last_started_frame_; |
320 int last_ended_frame_; | 321 int last_ended_frame_; |
321 | 322 |
322 bool disable_schedule_composite_; | |
323 | |
324 CompositorLock* compositor_lock_; | 323 CompositorLock* compositor_lock_; |
325 | 324 |
326 LayerAnimatorCollection layer_animator_collection_; | 325 LayerAnimatorCollection layer_animator_collection_; |
327 | 326 |
328 base::WeakPtrFactory<Compositor> weak_ptr_factory_; | 327 base::WeakPtrFactory<Compositor> weak_ptr_factory_; |
329 | 328 |
330 DISALLOW_COPY_AND_ASSIGN(Compositor); | 329 DISALLOW_COPY_AND_ASSIGN(Compositor); |
331 }; | 330 }; |
332 | 331 |
333 } // namespace ui | 332 } // namespace ui |
334 | 333 |
335 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 334 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |