Chromium Code Reviews| 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 const cc::RendererSettings& GetRendererSettings() const; | 358 const cc::RendererSettings& GetRendererSettings() const; |
| 359 | 359 |
| 360 LayerAnimatorCollection* layer_animator_collection() { | 360 LayerAnimatorCollection* layer_animator_collection() { |
| 361 return &layer_animator_collection_; | 361 return &layer_animator_collection_; |
| 362 } | 362 } |
| 363 | 363 |
| 364 const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; } | 364 const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; } |
| 365 int activated_frame_count() const { return activated_frame_count_; } | 365 int activated_frame_count() const { return activated_frame_count_; } |
| 366 float refresh_rate() const { return refresh_rate_; } | 366 float refresh_rate() const { return refresh_rate_; } |
| 367 | 367 |
| 368 void set_allow_locks_to_extend_timeout(bool allowed) { | |
| 369 allow_locks_to_extend_timeout_ = allowed; | |
| 370 } | |
| 371 | |
| 368 private: | 372 private: |
| 369 friend class base::RefCounted<Compositor>; | 373 friend class base::RefCounted<Compositor>; |
| 370 | 374 |
| 371 // CompositorLockDelegate implementation. | 375 // CompositorLockDelegate implementation. |
| 372 void RemoveCompositorLock(CompositorLock* lock) override; | 376 void RemoveCompositorLock(CompositorLock* lock) override; |
| 373 | 377 |
| 374 // Causes all active CompositorLocks to be timed out. | 378 // Causes all active CompositorLocks to be timed out. |
| 375 void TimeoutLocks(); | 379 void TimeoutLocks(); |
| 376 | 380 |
| 377 gfx::Size size_; | 381 gfx::Size size_; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 411 | 415 |
| 412 std::vector<CompositorLock*> active_locks_; | 416 std::vector<CompositorLock*> active_locks_; |
| 413 | 417 |
| 414 LayerAnimatorCollection layer_animator_collection_; | 418 LayerAnimatorCollection layer_animator_collection_; |
| 415 scoped_refptr<cc::AnimationTimeline> animation_timeline_; | 419 scoped_refptr<cc::AnimationTimeline> animation_timeline_; |
| 416 std::unique_ptr<ScopedAnimationDurationScaleMode> slow_animations_; | 420 std::unique_ptr<ScopedAnimationDurationScaleMode> slow_animations_; |
| 417 | 421 |
| 418 gfx::ColorSpace output_color_space_; | 422 gfx::ColorSpace output_color_space_; |
| 419 gfx::ColorSpace blending_color_space_; | 423 gfx::ColorSpace blending_color_space_; |
| 420 | 424 |
| 425 // The estimated time that the locks will be timedout. | |
|
danakj
2017/05/09 15:49:47
will time out.
| |
| 426 base::TimeTicks scheduled_timeout_; | |
| 427 // If true, the |scheduled_timeout_| might be recalculated and extended. | |
| 428 bool allow_locks_to_extend_timeout_; | |
| 429 | |
| 421 base::WeakPtrFactory<Compositor> weak_ptr_factory_; | 430 base::WeakPtrFactory<Compositor> weak_ptr_factory_; |
| 422 base::WeakPtrFactory<Compositor> lock_timeout_weak_ptr_factory_; | 431 base::WeakPtrFactory<Compositor> lock_timeout_weak_ptr_factory_; |
| 423 | 432 |
| 424 DISALLOW_COPY_AND_ASSIGN(Compositor); | 433 DISALLOW_COPY_AND_ASSIGN(Compositor); |
| 425 }; | 434 }; |
| 426 | 435 |
| 427 } // namespace ui | 436 } // namespace ui |
| 428 | 437 |
| 429 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 438 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
| OLD | NEW |