| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 class LayerTreeHost; | 44 class LayerTreeHost; |
| 45 class RendererSettings; | 45 class RendererSettings; |
| 46 class SharedBitmapManager; | 46 class SharedBitmapManager; |
| 47 class SurfaceIdAllocator; | 47 class SurfaceIdAllocator; |
| 48 class SurfaceManager; | 48 class SurfaceManager; |
| 49 class TaskGraphRunner; | 49 class TaskGraphRunner; |
| 50 } | 50 } |
| 51 | 51 |
| 52 namespace gfx { | 52 namespace gfx { |
| 53 class Rect; | 53 class Rect; |
| 54 class ScrollOffset; |
| 54 class Size; | 55 class Size; |
| 55 } | 56 } |
| 56 | 57 |
| 57 namespace gpu { | 58 namespace gpu { |
| 58 class GpuMemoryBufferManager; | 59 class GpuMemoryBufferManager; |
| 59 struct Mailbox; | 60 struct Mailbox; |
| 60 } | 61 } |
| 61 | 62 |
| 62 namespace ui { | 63 namespace ui { |
| 63 | 64 |
| 64 class Compositor; | 65 class Compositor; |
| 65 class CompositorVSyncManager; | 66 class CompositorVSyncManager; |
| 66 class LatencyInfo; | 67 class LatencyInfo; |
| 67 class Layer; | 68 class Layer; |
| 68 class Reflector; | 69 class Reflector; |
| 70 class UIScrollInputManager; |
| 69 class Texture; | 71 class Texture; |
| 70 | 72 |
| 71 const int kCompositorLockTimeoutMs = 67; | 73 const int kCompositorLockTimeoutMs = 67; |
| 72 | 74 |
| 73 class COMPOSITOR_EXPORT ContextFactoryObserver { | 75 class COMPOSITOR_EXPORT ContextFactoryObserver { |
| 74 public: | 76 public: |
| 75 virtual ~ContextFactoryObserver() {} | 77 virtual ~ContextFactoryObserver() {} |
| 76 | 78 |
| 77 // Notifies that the ContextProvider returned from | 79 // Notifies that the ContextProvider returned from |
| 78 // ui::ContextFactory::SharedMainThreadContextProvider was lost. When this | 80 // ui::ContextFactory::SharedMainThreadContextProvider was lost. When this |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 const cc::RendererSettings& GetRendererSettings() const; | 348 const cc::RendererSettings& GetRendererSettings() const; |
| 347 | 349 |
| 348 LayerAnimatorCollection* layer_animator_collection() { | 350 LayerAnimatorCollection* layer_animator_collection() { |
| 349 return &layer_animator_collection_; | 351 return &layer_animator_collection_; |
| 350 } | 352 } |
| 351 | 353 |
| 352 cc::SurfaceIdAllocator* surface_id_allocator() { | 354 cc::SurfaceIdAllocator* surface_id_allocator() { |
| 353 return surface_id_allocator_.get(); | 355 return surface_id_allocator_.get(); |
| 354 } | 356 } |
| 355 | 357 |
| 358 UIScrollInputManager* scroll_input_manager() { |
| 359 return scroll_input_manager_.get(); |
| 360 } |
| 361 |
| 362 bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset); |
| 363 |
| 356 private: | 364 private: |
| 357 friend class base::RefCounted<Compositor>; | 365 friend class base::RefCounted<Compositor>; |
| 358 friend class CompositorLock; | 366 friend class CompositorLock; |
| 359 | 367 |
| 360 // Called by CompositorLock. | 368 // Called by CompositorLock. |
| 361 void UnlockCompositor(); | 369 void UnlockCompositor(); |
| 362 | 370 |
| 363 // Called to release any pending CompositorLock | 371 // Called to release any pending CompositorLock |
| 364 void CancelCompositorLock(); | 372 void CancelCompositorLock(); |
| 365 | 373 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 387 // The device scale factor of the monitor that this compositor is compositing | 395 // The device scale factor of the monitor that this compositor is compositing |
| 388 // layers on. | 396 // layers on. |
| 389 float device_scale_factor_; | 397 float device_scale_factor_; |
| 390 | 398 |
| 391 bool locks_will_time_out_; | 399 bool locks_will_time_out_; |
| 392 CompositorLock* compositor_lock_; | 400 CompositorLock* compositor_lock_; |
| 393 | 401 |
| 394 LayerAnimatorCollection layer_animator_collection_; | 402 LayerAnimatorCollection layer_animator_collection_; |
| 395 scoped_refptr<cc::AnimationTimeline> animation_timeline_; | 403 scoped_refptr<cc::AnimationTimeline> animation_timeline_; |
| 396 | 404 |
| 405 std::unique_ptr<UIScrollInputManager> scroll_input_manager_; |
| 406 |
| 397 base::WeakPtrFactory<Compositor> weak_ptr_factory_; | 407 base::WeakPtrFactory<Compositor> weak_ptr_factory_; |
| 398 | 408 |
| 399 DISALLOW_COPY_AND_ASSIGN(Compositor); | 409 DISALLOW_COPY_AND_ASSIGN(Compositor); |
| 400 }; | 410 }; |
| 401 | 411 |
| 402 } // namespace ui | 412 } // namespace ui |
| 403 | 413 |
| 404 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 414 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
| OLD | NEW |