Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: services/ui/gpu/gpu_main.h

Issue 2768563002: Move DisplayCompositor code to new component. (Closed)
Patch Set: Rebase. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/gpu/DEPS ('k') | services/ui/gpu/gpu_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 SERVICES_UI_GPU_GPU_MAIN_H_ 5 #ifndef SERVICES_UI_GPU_GPU_MAIN_H_
6 #define SERVICES_UI_GPU_GPU_MAIN_H_ 6 #define SERVICES_UI_GPU_GPU_MAIN_H_
7 7
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "components/frame_sinks/display_compositor.h"
9 #include "gpu/ipc/in_process_command_buffer.h" 10 #include "gpu/ipc/in_process_command_buffer.h"
10 #include "gpu/ipc/service/gpu_init.h" 11 #include "gpu/ipc/service/gpu_init.h"
11 #include "services/ui/gpu/interfaces/gpu_main.mojom.h" 12 #include "services/ui/gpu/interfaces/gpu_main.mojom.h"
12 #include "services/ui/gpu/interfaces/gpu_service.mojom.h" 13 #include "services/ui/gpu/interfaces/gpu_service.mojom.h"
13 #include "services/ui/surfaces/display_compositor.h"
14 14
15 namespace gpu { 15 namespace gpu {
16 class GpuMemoryBufferFactory; 16 class GpuMemoryBufferFactory;
17 class ImageFactory; 17 class ImageFactory;
18 } 18 }
19 19
20 namespace ui { 20 namespace ui {
21 21
22 class GpuService; 22 class GpuService;
23 23
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // The InCommandCommandBuffer::Service used by the display compositor. 76 // The InCommandCommandBuffer::Service used by the display compositor.
77 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_command_service_; 77 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_command_service_;
78 78
79 // If the gpu service is not yet ready then we stash pending MessagePipes in 79 // If the gpu service is not yet ready then we stash pending MessagePipes in
80 // these member variables. 80 // these member variables.
81 cc::mojom::DisplayCompositorRequest pending_display_compositor_request_; 81 cc::mojom::DisplayCompositorRequest pending_display_compositor_request_;
82 cc::mojom::DisplayCompositorClientPtrInfo 82 cc::mojom::DisplayCompositorClientPtrInfo
83 pending_display_compositor_client_info_; 83 pending_display_compositor_client_info_;
84 84
85 std::unique_ptr<DisplayCompositor> display_compositor_; 85 std::unique_ptr<frame_sinks::DisplayCompositor> display_compositor_;
86 86
87 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_; 87 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
88 88
89 // The main thread for Gpu. 89 // The main thread for Gpu.
90 base::Thread gpu_thread_; 90 base::Thread gpu_thread_;
91 scoped_refptr<base::SingleThreadTaskRunner> gpu_thread_task_runner_; 91 scoped_refptr<base::SingleThreadTaskRunner> gpu_thread_task_runner_;
92 92
93 // The thread that handles IO events for Gpu. 93 // The thread that handles IO events for Gpu.
94 base::Thread io_thread_; 94 base::Thread io_thread_;
95 95
96 // The display compositor gets its own thread in mus-gpu. The gpu service, 96 // The display compositor gets its own thread in mus-gpu. The gpu service,
97 // where GL commands are processed resides on its own thread. Various 97 // where GL commands are processed resides on its own thread. Various
98 // components of the display compositor such as Display, ResourceProvider, 98 // components of the display compositor such as Display, ResourceProvider,
99 // and GLRenderer block on sync tokens from other command buffers. Thus, 99 // and GLRenderer block on sync tokens from other command buffers. Thus,
100 // the gpu service must live on a separate thread. 100 // the gpu service must live on a separate thread.
101 base::Thread compositor_thread_; 101 base::Thread compositor_thread_;
102 scoped_refptr<base::SingleThreadTaskRunner> compositor_thread_task_runner_; 102 scoped_refptr<base::SingleThreadTaskRunner> compositor_thread_task_runner_;
103 103
104 mojo::Binding<mojom::GpuMain> binding_; 104 mojo::Binding<mojom::GpuMain> binding_;
105 105
106 DISALLOW_COPY_AND_ASSIGN(GpuMain); 106 DISALLOW_COPY_AND_ASSIGN(GpuMain);
107 }; 107 };
108 108
109 } // namespace ui 109 } // namespace ui
110 110
111 #endif // SERVICES_UI_GPU_GPU_MAIN_H_ 111 #endif // SERVICES_UI_GPU_GPU_MAIN_H_
OLDNEW
« no previous file with comments | « services/ui/gpu/DEPS ('k') | services/ui/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698