| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/time.h" | 15 #include "base/time.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "content/common/child_thread.h" | 17 #include "content/common/child_thread.h" |
| 18 #include "content/common/gpu_info.h" | 18 #include "content/common/gpu/gpu_channel.h" |
| 19 #include "content/gpu/gpu_channel.h" | 19 #include "content/common/gpu/gpu_channel_manager.h" |
| 20 #include "content/gpu/gpu_config.h" | 20 #include "content/common/gpu/gpu_config.h" |
| 21 #include "content/gpu/gpu_render_thread.h" | 21 #include "content/common/gpu/gpu_info.h" |
| 22 #include "content/gpu/x_util.h" | 22 #include "content/common/gpu/x_util.h" |
| 23 #include "ui/gfx/native_widget_types.h" | 23 #include "ui/gfx/native_widget_types.h" |
| 24 | 24 |
| 25 namespace IPC { | 25 namespace IPC { |
| 26 struct ChannelHandle; | 26 struct ChannelHandle; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace sandbox { | 29 namespace sandbox { |
| 30 class TargetServices; | 30 class TargetServices; |
| 31 } | 31 } |
| 32 | 32 |
| 33 class GpuWatchdogThread; | 33 class GpuWatchdogThread; |
| 34 | 34 |
| 35 // The main thread of the GPU child process. There will only ever be one of | 35 // The main thread of the GPU child process. There will only ever be one of |
| 36 // these per process. It does process initialization and shutdown. It forwards | 36 // these per process. It does process initialization and shutdown. It forwards |
| 37 // IPC messages to GpuRenderThread, which is responsible for issuing rendering | 37 // IPC messages to GpuChannelManager, which is responsible for issuing rendering |
| 38 // commands to the GPU. | 38 // commands to the GPU. |
| 39 class GpuChildThread : public ChildThread { | 39 class GpuChildThread : public ChildThread { |
| 40 public: | 40 public: |
| 41 #if defined(OS_WIN) | 41 #if defined(OS_WIN) |
| 42 explicit GpuChildThread(sandbox::TargetServices* target_services); | 42 explicit GpuChildThread(sandbox::TargetServices* target_services); |
| 43 #else | 43 #else |
| 44 GpuChildThread(); | 44 GpuChildThread(); |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 // For single-process mode. | 47 // For single-process mode. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 72 scoped_refptr<GpuWatchdogThread> watchdog_thread_; | 72 scoped_refptr<GpuWatchdogThread> watchdog_thread_; |
| 73 | 73 |
| 74 #if defined(OS_WIN) | 74 #if defined(OS_WIN) |
| 75 // Windows specific client sandbox interface. | 75 // Windows specific client sandbox interface. |
| 76 sandbox::TargetServices* target_services_; | 76 sandbox::TargetServices* target_services_; |
| 77 | 77 |
| 78 // Indicates whether DirectX Diagnostics collection is ongoing. | 78 // Indicates whether DirectX Diagnostics collection is ongoing. |
| 79 bool collecting_dx_diagnostics_; | 79 bool collecting_dx_diagnostics_; |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 scoped_ptr<GpuRenderThread> render_thread_; | 82 scoped_ptr<GpuChannelManager> gpu_channel_manager_; |
| 83 | 83 |
| 84 // Information about the GPU, such as device and vendor ID. | 84 // Information about the GPU, such as device and vendor ID. |
| 85 GPUInfo gpu_info_; | 85 GPUInfo gpu_info_; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 87 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 90 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| OLD | NEW |