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

Side by Side Diff: content/gpu/gpu_child_thread.h

Issue 2696473002: gpu: Use mojom API for creating gpu channel. (Closed)
Patch Set: . Created 3 years, 10 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 (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 CONTENT_GPU_GPU_CHILD_THREAD_H_ 5 #ifndef CONTENT_GPU_GPU_CHILD_THREAD_H_
6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_ 6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 28 matching lines...) Expand all
39 class GpuMemoryBufferFactory; 39 class GpuMemoryBufferFactory;
40 class GpuWatchdogThread; 40 class GpuWatchdogThread;
41 } 41 }
42 42
43 namespace sandbox { 43 namespace sandbox {
44 class TargetServices; 44 class TargetServices;
45 } 45 }
46 46
47 namespace content { 47 namespace content {
48 class GpuServiceFactory; 48 class GpuServiceFactory;
49 struct EstablishChannelParams;
50 49
51 // The main thread of the GPU child process. There will only ever be one of 50 // The main thread of the GPU child process. There will only ever be one of
52 // these per process. It does process initialization and shutdown. It forwards 51 // these per process. It does process initialization and shutdown. It forwards
53 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing 52 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing
54 // rendering commands to the GPU. 53 // rendering commands to the GPU.
55 class GpuChildThread : public ChildThreadImpl, 54 class GpuChildThread : public ChildThreadImpl,
56 public ui::mojom::GpuMain, 55 public ui::mojom::GpuMain,
57 public base::FieldTrialList::Observer { 56 public base::FieldTrialList::Observer {
58 public: 57 public:
59 struct LogMessage { 58 struct LogMessage {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void OnSetVideoMemoryWindowCount(uint32_t window_count); 116 void OnSetVideoMemoryWindowCount(uint32_t window_count);
118 117
119 void OnClean(); 118 void OnClean();
120 void OnCrash(); 119 void OnCrash();
121 void OnHang(); 120 void OnHang();
122 #if defined(OS_ANDROID) 121 #if defined(OS_ANDROID)
123 void OnJavaCrash(); 122 void OnJavaCrash();
124 #endif 123 #endif
125 void OnGpuSwitched(); 124 void OnGpuSwitched();
126 125
127 void OnEstablishChannel(const EstablishChannelParams& params);
128 void OnCloseChannel(int32_t client_id); 126 void OnCloseChannel(int32_t client_id);
129 void OnLoadedShader(const std::string& shader); 127 void OnLoadedShader(const std::string& shader);
130 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 128 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
131 int client_id, 129 int client_id,
132 const gpu::SyncToken& sync_token); 130 const gpu::SyncToken& sync_token);
133 #if defined(OS_ANDROID) 131 #if defined(OS_ANDROID)
134 void OnWakeUpGpu(); 132 void OnWakeUpGpu();
135 void OnDestroyingVideoSurface(int surface_id); 133 void OnDestroyingVideoSurface(int surface_id);
136 #endif 134 #endif
137 135
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 AssociatedInterfaceRegistryImpl associated_interfaces_; 169 AssociatedInterfaceRegistryImpl associated_interfaces_;
172 std::unique_ptr<ui::GpuService> gpu_service_; 170 std::unique_ptr<ui::GpuService> gpu_service_;
173 mojo::AssociatedBinding<ui::mojom::GpuMain> gpu_main_binding_; 171 mojo::AssociatedBinding<ui::mojom::GpuMain> gpu_main_binding_;
174 172
175 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); 173 DISALLOW_COPY_AND_ASSIGN(GpuChildThread);
176 }; 174 };
177 175
178 } // namespace content 176 } // namespace content
179 177
180 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ 178 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698