| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_MUS_SURFACES_DISPLAY_COMPOSITOR_H_ | 5 #ifndef COMPONENTS_MUS_SURFACES_DISPLAY_COMPOSITOR_H_ |
| 6 #define COMPONENTS_MUS_SURFACES_DISPLAY_COMPOSITOR_H_ | 6 #define COMPONENTS_MUS_SURFACES_DISPLAY_COMPOSITOR_H_ |
| 7 | 7 |
| 8 #include "cc/surfaces/display_client.h" | 8 #include "cc/surfaces/display_client.h" |
| 9 #include "cc/surfaces/surface.h" | 9 #include "cc/surfaces/surface.h" |
| 10 #include "cc/surfaces/surface_factory.h" | 10 #include "cc/surfaces/surface_factory.h" |
| 11 #include "cc/surfaces/surface_factory_client.h" | 11 #include "cc/surfaces/surface_factory_client.h" |
| 12 #include "cc/surfaces/surface_id_allocator.h" | 12 #include "cc/surfaces/surface_id_allocator.h" |
| 13 #include "components/mus/gles2/gpu_state.h" | 13 #include "components/mus/gles2/gpu_state.h" |
| 14 #include "components/mus/surfaces/surfaces_state.h" | 14 #include "components/mus/surfaces/surfaces_state.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 class Display; | 18 class Display; |
| 19 class SyntheticBeginFrameSource; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace mus { | 22 namespace mus { |
| 22 | 23 |
| 23 // TODO(fsamuel): This should become a mojo interface for the mus-gpu split. | 24 // TODO(fsamuel): This should become a mojo interface for the mus-gpu split. |
| 24 // TODO(fsamuel): This should not be a SurfaceFactoryClient. | 25 // TODO(fsamuel): This should not be a SurfaceFactoryClient. |
| 25 // The DisplayCompositor receives CompositorFrames from all sources, | 26 // The DisplayCompositor receives CompositorFrames from all sources, |
| 26 // creates a top-level CompositorFrame once per tick, and generates graphical | 27 // creates a top-level CompositorFrame once per tick, and generates graphical |
| 27 // output. | 28 // output. |
| 28 class DisplayCompositor : public cc::SurfaceFactoryClient, | 29 class DisplayCompositor : public cc::SurfaceFactoryClient, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void DisplayOutputSurfaceLost() override; | 65 void DisplayOutputSurfaceLost() override; |
| 65 void DisplaySetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override; | 66 void DisplaySetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override; |
| 66 | 67 |
| 67 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 68 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 68 scoped_refptr<SurfacesState> surfaces_state_; | 69 scoped_refptr<SurfacesState> surfaces_state_; |
| 69 cc::SurfaceFactory factory_; | 70 cc::SurfaceFactory factory_; |
| 70 cc::SurfaceIdAllocator allocator_; | 71 cc::SurfaceIdAllocator allocator_; |
| 71 cc::SurfaceId surface_id_; | 72 cc::SurfaceId surface_id_; |
| 72 | 73 |
| 73 gfx::Size display_size_; | 74 gfx::Size display_size_; |
| 75 |
| 76 std::unique_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source_; |
| 74 std::unique_ptr<cc::Display> display_; | 77 std::unique_ptr<cc::Display> display_; |
| 78 |
| 75 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor); | 79 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor); |
| 76 }; | 80 }; |
| 77 | 81 |
| 78 } // namespace mus | 82 } // namespace mus |
| 79 | 83 |
| 80 #endif // COMPONENTS_MUS_SURFACES_DISPLAY_COMPOSITOR_H_ | 84 #endif // COMPONENTS_MUS_SURFACES_DISPLAY_COMPOSITOR_H_ |
| OLD | NEW |