| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 const cc::RendererSettings& GetRendererSettings() const; | 317 const cc::RendererSettings& GetRendererSettings() const; |
| 318 | 318 |
| 319 LayerAnimatorCollection* layer_animator_collection() { | 319 LayerAnimatorCollection* layer_animator_collection() { |
| 320 return &layer_animator_collection_; | 320 return &layer_animator_collection_; |
| 321 } | 321 } |
| 322 | 322 |
| 323 cc::SurfaceIdAllocator* surface_id_allocator() { | 323 cc::SurfaceIdAllocator* surface_id_allocator() { |
| 324 return surface_id_allocator_.get(); | 324 return surface_id_allocator_.get(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 // Returns true if the compositor has swapped a frame since being resized. |
| 328 bool has_swapped_frame_at_current_size() const { |
| 329 return has_swapped_frame_at_current_size_; |
| 330 } |
| 331 |
| 327 private: | 332 private: |
| 328 friend class base::RefCounted<Compositor>; | 333 friend class base::RefCounted<Compositor>; |
| 329 friend class CompositorLock; | 334 friend class CompositorLock; |
| 330 | 335 |
| 331 // Called by CompositorLock. | 336 // Called by CompositorLock. |
| 332 void UnlockCompositor(); | 337 void UnlockCompositor(); |
| 333 | 338 |
| 334 // Called to release any pending CompositorLock | 339 // Called to release any pending CompositorLock |
| 335 void CancelCompositorLock(); | 340 void CancelCompositorLock(); |
| 336 | 341 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 365 int last_ended_frame_; | 370 int last_ended_frame_; |
| 366 | 371 |
| 367 bool locks_will_time_out_; | 372 bool locks_will_time_out_; |
| 368 CompositorLock* compositor_lock_; | 373 CompositorLock* compositor_lock_; |
| 369 | 374 |
| 370 LayerAnimatorCollection layer_animator_collection_; | 375 LayerAnimatorCollection layer_animator_collection_; |
| 371 | 376 |
| 372 // Used to send to any new CompositorBeginFrameObserver immediately. | 377 // Used to send to any new CompositorBeginFrameObserver immediately. |
| 373 cc::BeginFrameArgs missed_begin_frame_args_; | 378 cc::BeginFrameArgs missed_begin_frame_args_; |
| 374 | 379 |
| 380 bool has_swapped_frame_at_current_size_; |
| 381 |
| 375 base::WeakPtrFactory<Compositor> weak_ptr_factory_; | 382 base::WeakPtrFactory<Compositor> weak_ptr_factory_; |
| 376 | 383 |
| 377 DISALLOW_COPY_AND_ASSIGN(Compositor); | 384 DISALLOW_COPY_AND_ASSIGN(Compositor); |
| 378 }; | 385 }; |
| 379 | 386 |
| 380 } // namespace ui | 387 } // namespace ui |
| 381 | 388 |
| 382 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 389 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
| OLD | NEW |