| 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 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 Loading... |
| 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; |
| 49 | 50 |
| 50 // The main thread of the GPU child process. There will only ever be one of | 51 // The main thread of the GPU child process. There will only ever be one of |
| 51 // these per process. It does process initialization and shutdown. It forwards | 52 // these per process. It does process initialization and shutdown. It forwards |
| 52 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing | 53 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing |
| 53 // rendering commands to the GPU. | 54 // rendering commands to the GPU. |
| 54 class GpuChildThread : public ChildThreadImpl, | 55 class GpuChildThread : public ChildThreadImpl, |
| 55 public ui::mojom::GpuMain, | 56 public ui::mojom::GpuMain, |
| 56 public base::FieldTrialList::Observer { | 57 public base::FieldTrialList::Observer { |
| 57 public: | 58 public: |
| 58 struct LogMessage { | 59 struct LogMessage { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 void OnSetVideoMemoryWindowCount(uint32_t window_count); | 116 void OnSetVideoMemoryWindowCount(uint32_t window_count); |
| 116 | 117 |
| 117 void OnClean(); | 118 void OnClean(); |
| 118 void OnCrash(); | 119 void OnCrash(); |
| 119 void OnHang(); | 120 void OnHang(); |
| 120 #if defined(OS_ANDROID) | 121 #if defined(OS_ANDROID) |
| 121 void OnJavaCrash(); | 122 void OnJavaCrash(); |
| 122 #endif | 123 #endif |
| 123 void OnGpuSwitched(); | 124 void OnGpuSwitched(); |
| 124 | 125 |
| 126 void OnEstablishChannel(const EstablishChannelParams& params); |
| 125 void OnCloseChannel(int32_t client_id); | 127 void OnCloseChannel(int32_t client_id); |
| 126 void OnLoadedShader(const std::string& shader); | 128 void OnLoadedShader(const std::string& shader); |
| 127 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, | 129 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
| 128 int client_id, | 130 int client_id, |
| 129 const gpu::SyncToken& sync_token); | 131 const gpu::SyncToken& sync_token); |
| 130 #if defined(OS_ANDROID) | 132 #if defined(OS_ANDROID) |
| 131 void OnWakeUpGpu(); | 133 void OnWakeUpGpu(); |
| 132 void OnDestroyingVideoSurface(int surface_id); | 134 void OnDestroyingVideoSurface(int surface_id); |
| 133 #endif | 135 #endif |
| 134 | 136 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 AssociatedInterfaceRegistryImpl associated_interfaces_; | 170 AssociatedInterfaceRegistryImpl associated_interfaces_; |
| 169 std::unique_ptr<ui::GpuService> gpu_service_; | 171 std::unique_ptr<ui::GpuService> gpu_service_; |
| 170 mojo::AssociatedBinding<ui::mojom::GpuMain> gpu_main_binding_; | 172 mojo::AssociatedBinding<ui::mojom::GpuMain> gpu_main_binding_; |
| 171 | 173 |
| 172 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 174 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
| 173 }; | 175 }; |
| 174 | 176 |
| 175 } // namespace content | 177 } // namespace content |
| 176 | 178 |
| 177 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 179 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| OLD | NEW |