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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
377 void SetOutputIsSecure(bool output_is_secure); | 377 void SetOutputIsSecure(bool output_is_secure); |
378 | 378 |
379 const cc::LayerTreeDebugState& GetLayerTreeDebugState() const; | 379 const cc::LayerTreeDebugState& GetLayerTreeDebugState() const; |
380 void SetLayerTreeDebugState(const cc::LayerTreeDebugState& debug_state); | 380 void SetLayerTreeDebugState(const cc::LayerTreeDebugState& debug_state); |
381 const cc::RendererSettings& GetRendererSettings() const; | 381 const cc::RendererSettings& GetRendererSettings() const; |
382 | 382 |
383 LayerAnimatorCollection* layer_animator_collection() { | 383 LayerAnimatorCollection* layer_animator_collection() { |
384 return &layer_animator_collection_; | 384 return &layer_animator_collection_; |
385 } | 385 } |
386 | 386 |
387 cc::SurfaceIdAllocator* surface_id_allocator() { | 387 const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; } |
388 return surface_id_allocator_.get(); | |
389 } | |
390 | 388 |
391 private: | 389 private: |
392 friend class base::RefCounted<Compositor>; | 390 friend class base::RefCounted<Compositor>; |
393 friend class CompositorLock; | 391 friend class CompositorLock; |
394 | 392 |
395 // Called by CompositorLock. | 393 // Called by CompositorLock. |
396 void UnlockCompositor(); | 394 void UnlockCompositor(); |
397 | 395 |
398 // Called to release any pending CompositorLock | 396 // Called to release any pending CompositorLock |
399 void CancelCompositorLock(); | 397 void CancelCompositorLock(); |
400 | 398 |
401 gfx::Size size_; | 399 gfx::Size size_; |
402 | 400 |
403 ui::ContextFactory* context_factory_; | 401 ui::ContextFactory* context_factory_; |
404 | 402 |
405 // The root of the Layer tree drawn by this compositor. | 403 // The root of the Layer tree drawn by this compositor. |
406 Layer* root_layer_; | 404 Layer* root_layer_; |
407 | 405 |
408 base::ObserverList<CompositorObserver, true> observer_list_; | 406 base::ObserverList<CompositorObserver, true> observer_list_; |
409 base::ObserverList<CompositorAnimationObserver> animation_observer_list_; | 407 base::ObserverList<CompositorAnimationObserver> animation_observer_list_; |
410 | 408 |
411 gfx::AcceleratedWidget widget_; | 409 gfx::AcceleratedWidget widget_; |
412 #if defined(USE_AURA) | 410 #if defined(USE_AURA) |
413 ui::Window* window_; | 411 ui::Window* window_; |
414 #endif | 412 #endif |
415 // A map from child id to parent id. | 413 // A map from child id to parent id. |
416 std::unordered_map<cc::FrameSinkId, cc::FrameSinkId, cc::FrameSinkIdHash> | 414 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> child_frame_sinks_; |
417 frame_sinks_; | |
418 bool widget_valid_; | 415 bool widget_valid_; |
419 bool compositor_frame_sink_requested_; | 416 bool compositor_frame_sink_requested_; |
417 cc::FrameSinkId frame_sink_id_; | |
sky
2016/10/03 19:18:25
And here.
Fady Samuel
2016/10/03 19:45:29
Done.
| |
420 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 418 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; |
421 scoped_refptr<cc::Layer> root_web_layer_; | 419 scoped_refptr<cc::Layer> root_web_layer_; |
422 std::unique_ptr<cc::LayerTreeHost> host_; | 420 std::unique_ptr<cc::LayerTreeHost> host_; |
423 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 421 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
424 | 422 |
425 // The manager of vsync parameters for this compositor. | 423 // The manager of vsync parameters for this compositor. |
426 scoped_refptr<CompositorVSyncManager> vsync_manager_; | 424 scoped_refptr<CompositorVSyncManager> vsync_manager_; |
427 | 425 |
428 // The device scale factor of the monitor that this compositor is compositing | 426 // The device scale factor of the monitor that this compositor is compositing |
429 // layers on. | 427 // layers on. |
430 float device_scale_factor_; | 428 float device_scale_factor_; |
431 | 429 |
432 bool locks_will_time_out_; | 430 bool locks_will_time_out_; |
433 CompositorLock* compositor_lock_; | 431 CompositorLock* compositor_lock_; |
434 | 432 |
435 LayerAnimatorCollection layer_animator_collection_; | 433 LayerAnimatorCollection layer_animator_collection_; |
436 scoped_refptr<cc::AnimationTimeline> animation_timeline_; | 434 scoped_refptr<cc::AnimationTimeline> animation_timeline_; |
437 | 435 |
438 gfx::ColorSpace color_space_; | 436 gfx::ColorSpace color_space_; |
439 | 437 |
440 base::WeakPtrFactory<Compositor> weak_ptr_factory_; | 438 base::WeakPtrFactory<Compositor> weak_ptr_factory_; |
441 | 439 |
442 DISALLOW_COPY_AND_ASSIGN(Compositor); | 440 DISALLOW_COPY_AND_ASSIGN(Compositor); |
443 }; | 441 }; |
444 | 442 |
445 } // namespace ui | 443 } // namespace ui |
446 | 444 |
447 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 445 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |