| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 383 |
| 384 const cc::LayerTreeDebugState& GetLayerTreeDebugState() const; | 384 const cc::LayerTreeDebugState& GetLayerTreeDebugState() const; |
| 385 void SetLayerTreeDebugState(const cc::LayerTreeDebugState& debug_state); | 385 void SetLayerTreeDebugState(const cc::LayerTreeDebugState& debug_state); |
| 386 const cc::RendererSettings& GetRendererSettings() const; | 386 const cc::RendererSettings& GetRendererSettings() const; |
| 387 | 387 |
| 388 LayerAnimatorCollection* layer_animator_collection() { | 388 LayerAnimatorCollection* layer_animator_collection() { |
| 389 return &layer_animator_collection_; | 389 return &layer_animator_collection_; |
| 390 } | 390 } |
| 391 | 391 |
| 392 const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; } | 392 const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; } |
| 393 int submitted_frame_number() const { return submitted_frame_number_; } |
| 393 | 394 |
| 394 private: | 395 private: |
| 395 friend class base::RefCounted<Compositor>; | 396 friend class base::RefCounted<Compositor>; |
| 396 friend class CompositorLock; | 397 friend class CompositorLock; |
| 397 | 398 |
| 398 // Called by CompositorLock. | 399 // Called by CompositorLock. |
| 399 void UnlockCompositor(); | 400 void UnlockCompositor(); |
| 400 | 401 |
| 401 // Called to release any pending CompositorLock | 402 // Called to release any pending CompositorLock |
| 402 void CancelCompositorLock(); | 403 void CancelCompositorLock(); |
| 403 | 404 |
| 404 gfx::Size size_; | 405 gfx::Size size_; |
| 405 | 406 |
| 406 ui::ContextFactory* context_factory_; | 407 ui::ContextFactory* context_factory_; |
| 407 ui::ContextFactoryPrivate* context_factory_private_; | 408 ui::ContextFactoryPrivate* context_factory_private_; |
| 408 | 409 |
| 409 // The root of the Layer tree drawn by this compositor. | 410 // The root of the Layer tree drawn by this compositor. |
| 410 Layer* root_layer_; | 411 Layer* root_layer_; |
| 411 | 412 |
| 412 base::ObserverList<CompositorObserver, true> observer_list_; | 413 base::ObserverList<CompositorObserver, true> observer_list_; |
| 413 base::ObserverList<CompositorAnimationObserver> animation_observer_list_; | 414 base::ObserverList<CompositorAnimationObserver> animation_observer_list_; |
| 414 | 415 |
| 415 gfx::AcceleratedWidget widget_; | 416 gfx::AcceleratedWidget widget_; |
| 416 #if defined(USE_AURA) | 417 #if defined(USE_AURA) |
| 417 ui::Window* window_; | 418 ui::Window* window_; |
| 418 #endif | 419 #endif |
| 420 // A sequence number of a current compositor frame for use with metrics. |
| 421 int submitted_frame_number_; |
| 419 // A map from child id to parent id. | 422 // A map from child id to parent id. |
| 420 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> child_frame_sinks_; | 423 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> child_frame_sinks_; |
| 421 bool widget_valid_; | 424 bool widget_valid_; |
| 422 bool compositor_frame_sink_requested_; | 425 bool compositor_frame_sink_requested_; |
| 423 const cc::FrameSinkId frame_sink_id_; | 426 const cc::FrameSinkId frame_sink_id_; |
| 424 scoped_refptr<cc::Layer> root_web_layer_; | 427 scoped_refptr<cc::Layer> root_web_layer_; |
| 425 std::unique_ptr<cc::AnimationHost> animation_host_; | 428 std::unique_ptr<cc::AnimationHost> animation_host_; |
| 426 std::unique_ptr<cc::LayerTreeHost> host_; | 429 std::unique_ptr<cc::LayerTreeHost> host_; |
| 427 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 430 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 428 | 431 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 443 gfx::ColorSpace color_space_; | 446 gfx::ColorSpace color_space_; |
| 444 | 447 |
| 445 base::WeakPtrFactory<Compositor> weak_ptr_factory_; | 448 base::WeakPtrFactory<Compositor> weak_ptr_factory_; |
| 446 | 449 |
| 447 DISALLOW_COPY_AND_ASSIGN(Compositor); | 450 DISALLOW_COPY_AND_ASSIGN(Compositor); |
| 448 }; | 451 }; |
| 449 | 452 |
| 450 } // namespace ui | 453 } // namespace ui |
| 451 | 454 |
| 452 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 455 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
| OLD | NEW |