| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // 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 |
| 52 // these per process. It does process initialization and shutdown. It forwards | 52 // these per process. It does process initialization and shutdown. It forwards |
| 53 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing | 53 // IPC messages to gpu::GpuChannelManager, which is responsible for issuing |
| 54 // rendering commands to the GPU. | 54 // rendering commands to the GPU. |
| 55 class GpuChildThread : public ChildThreadImpl, | 55 class GpuChildThread : public ChildThreadImpl, |
| 56 public gpu::GpuChannelManagerDelegate, | 56 public gpu::GpuChannelManagerDelegate, |
| 57 public base::FieldTrialList::Observer { | 57 public base::FieldTrialList::Observer { |
| 58 public: | 58 public: |
| 59 typedef std::queue<IPC::Message*> DeferredMessages; | 59 typedef std::queue<IPC::Message*> DeferredMessages; |
| 60 | 60 |
| 61 // Returns the one gpu thread for this process. Note that this can only | |
| 62 // be accessed when running on the gpu thread itself. | |
| 63 static GpuChildThread* current(); | |
| 64 | |
| 65 GpuChildThread(GpuWatchdogThread* gpu_watchdog_thread, | 61 GpuChildThread(GpuWatchdogThread* gpu_watchdog_thread, |
| 66 bool dead_on_arrival, | 62 bool dead_on_arrival, |
| 67 const gpu::GPUInfo& gpu_info, | 63 const gpu::GPUInfo& gpu_info, |
| 68 const DeferredMessages& deferred_messages, | 64 const DeferredMessages& deferred_messages, |
| 69 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory); | 65 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory); |
| 70 | 66 |
| 71 GpuChildThread(const gpu::GpuPreferences& gpu_preferences, | 67 GpuChildThread(const gpu::GpuPreferences& gpu_preferences, |
| 72 const InProcessChildThreadParams& params, | 68 const InProcessChildThreadParams& params, |
| 73 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory); | 69 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory); |
| 74 | 70 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 169 |
| 174 // Bindings to the mojom::ProcessControl impl. | 170 // Bindings to the mojom::ProcessControl impl. |
| 175 mojo::BindingSet<mojom::ProcessControl> process_control_bindings_; | 171 mojo::BindingSet<mojom::ProcessControl> process_control_bindings_; |
| 176 | 172 |
| 177 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 173 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
| 178 }; | 174 }; |
| 179 | 175 |
| 180 } // namespace content | 176 } // namespace content |
| 181 | 177 |
| 182 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 178 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| OLD | NEW |