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

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

Issue 2942283002: viz: Use a simple GpuMemoryBufferManager implementation. (Closed)
Patch Set: . Created 3 years, 6 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
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/power_monitor/power_monitor.h" 8 #include "base/power_monitor/power_monitor.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "gpu/ipc/in_process_command_buffer.h" 10 #include "gpu/ipc/in_process_command_buffer.h"
11 #include "gpu/ipc/service/gpu_init.h" 11 #include "gpu/ipc/service/gpu_init.h"
12 #include "mojo/public/cpp/bindings/binding.h" 12 #include "mojo/public/cpp/bindings/binding.h"
13 #include "services/ui/gpu/interfaces/gpu_main.mojom.h" 13 #include "services/ui/gpu/interfaces/gpu_main.mojom.h"
14 #include "services/ui/gpu/interfaces/gpu_service.mojom.h" 14 #include "services/ui/gpu/interfaces/gpu_service.mojom.h"
15 15
16 namespace gpu { 16 namespace gpu {
17 class GpuMemoryBufferFactory; 17 class GpuMemoryBufferFactory;
18 class ImageFactory;
19 } 18 }
20 19
21 namespace viz { 20 namespace viz {
22 class DisplayProvider; 21 class DisplayProvider;
23 class MojoFrameSinkManager; 22 class MojoFrameSinkManager;
24 } 23 }
25 24
26 namespace ui { 25 namespace ui {
27 26
28 class GpuService; 27 class GpuService;
(...skipping 19 matching lines...) Expand all
48 private: 47 private:
49 void BindOnGpu(mojom::GpuMainRequest request); 48 void BindOnGpu(mojom::GpuMainRequest request);
50 void InitOnGpuThread( 49 void InitOnGpuThread(
51 scoped_refptr<base::SingleThreadTaskRunner> io_runner, 50 scoped_refptr<base::SingleThreadTaskRunner> io_runner,
52 scoped_refptr<base::SingleThreadTaskRunner> compositor_runner); 51 scoped_refptr<base::SingleThreadTaskRunner> compositor_runner);
53 52
54 void CreateFrameSinkManagerInternal( 53 void CreateFrameSinkManagerInternal(
55 cc::mojom::FrameSinkManagerRequest request, 54 cc::mojom::FrameSinkManagerRequest request,
56 cc::mojom::FrameSinkManagerClientPtrInfo client_info); 55 cc::mojom::FrameSinkManagerClientPtrInfo client_info);
57 void CreateFrameSinkManagerOnCompositorThread( 56 void CreateFrameSinkManagerOnCompositorThread(
58 gpu::ImageFactory* image_factory,
59 mojom::GpuServicePtrInfo gpu_service_info,
60 cc::mojom::FrameSinkManagerRequest request, 57 cc::mojom::FrameSinkManagerRequest request,
61 cc::mojom::FrameSinkManagerClientPtrInfo client_info); 58 cc::mojom::FrameSinkManagerClientPtrInfo client_info);
62 void CreateGpuServiceOnGpuThread(mojom::GpuServiceRequest request, 59 void CreateGpuServiceOnGpuThread(mojom::GpuServiceRequest request,
63 mojom::GpuHostPtr gpu_host, 60 mojom::GpuHostPtr gpu_host,
64 const gpu::GpuPreferences& preferences, 61 const gpu::GpuPreferences& preferences,
65 gpu::GpuProcessActivityFlags activity_flags); 62 gpu::GpuProcessActivityFlags activity_flags);
66 void BindGpuInternalOnGpuThread(mojom::GpuServiceRequest request);
67 63
68 void TearDownOnCompositorThread(); 64 void TearDownOnCompositorThread();
69 void TearDownOnGpuThread(); 65 void TearDownOnGpuThread();
70 66
71 // gpu::GpuSandboxHelper: 67 // gpu::GpuSandboxHelper:
72 void PreSandboxStartup() override; 68 void PreSandboxStartup() override;
73 bool EnsureSandboxInitialized( 69 bool EnsureSandboxInitialized(
74 gpu::GpuWatchdogThread* watchdog_thread) override; 70 gpu::GpuWatchdogThread* watchdog_thread) override;
75 71
76 std::unique_ptr<gpu::GpuInit> gpu_init_; 72 std::unique_ptr<gpu::GpuInit> gpu_init_;
77 std::unique_ptr<GpuService> gpu_service_; 73 std::unique_ptr<GpuService> gpu_service_;
78 74
79 // The message-pipe used by the FrameSinkManager to request gpu memory
80 // buffers.
81 mojom::GpuServicePtr gpu_internal_;
82
83 // The InCommandCommandBuffer::Service used by the frame sink manager. 75 // The InCommandCommandBuffer::Service used by the frame sink manager.
84 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_command_service_; 76 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_command_service_;
85 77
86 // If the gpu service is not yet ready then we stash pending MessagePipes in 78 // If the gpu service is not yet ready then we stash pending MessagePipes in
87 // these member variables. 79 // these member variables.
88 cc::mojom::FrameSinkManagerRequest pending_frame_sink_manager_request_; 80 cc::mojom::FrameSinkManagerRequest pending_frame_sink_manager_request_;
89 cc::mojom::FrameSinkManagerClientPtrInfo 81 cc::mojom::FrameSinkManagerClientPtrInfo
90 pending_frame_sink_manager_client_info_; 82 pending_frame_sink_manager_client_info_;
91 83
92 // Provides mojo interfaces for creating and managing FrameSinks. 84 // Provides mojo interfaces for creating and managing FrameSinks.
(...skipping 19 matching lines...) Expand all
112 104
113 base::PowerMonitor power_monitor_; 105 base::PowerMonitor power_monitor_;
114 mojo::Binding<mojom::GpuMain> binding_; 106 mojo::Binding<mojom::GpuMain> binding_;
115 107
116 DISALLOW_COPY_AND_ASSIGN(GpuMain); 108 DISALLOW_COPY_AND_ASSIGN(GpuMain);
117 }; 109 };
118 110
119 } // namespace ui 111 } // namespace ui
120 112
121 #endif // SERVICES_UI_GPU_GPU_MAIN_H_ 113 #endif // SERVICES_UI_GPU_GPU_MAIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698