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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 } | 27 } |
28 | 28 |
29 class GpuWatchdogThread; | 29 class GpuWatchdogThread; |
30 | 30 |
31 // The main thread of the GPU child process. There will only ever be one of | 31 // The main thread of the GPU child process. There will only ever be one of |
32 // these per process. It does process initialization and shutdown. It forwards | 32 // these per process. It does process initialization and shutdown. It forwards |
33 // IPC messages to GpuChannelManager, which is responsible for issuing rendering | 33 // IPC messages to GpuChannelManager, which is responsible for issuing rendering |
34 // commands to the GPU. | 34 // commands to the GPU. |
35 class GpuChildThread : public ChildThread { | 35 class GpuChildThread : public ChildThread { |
36 public: | 36 public: |
37 explicit GpuChildThread(bool dead_on_arrival, | 37 GpuChildThread(); |
38 const content::GPUInfo& gpu_info); | |
39 | 38 |
40 // For single-process mode. | 39 // For single-process mode. |
41 explicit GpuChildThread(const std::string& channel_id); | 40 explicit GpuChildThread(const std::string& channel_id); |
42 | 41 |
43 virtual ~GpuChildThread(); | 42 virtual ~GpuChildThread(); |
44 | 43 |
45 void Init(const base::Time& process_start_time); | 44 void Init(const base::Time& process_start_time); |
46 void StopWatchdog(); | 45 void StopWatchdog(); |
47 | 46 |
48 // ChildThread overrides. | 47 // ChildThread overrides. |
(...skipping 11 matching lines...) Expand all Loading... |
60 #if defined(USE_TCMALLOC) | 59 #if defined(USE_TCMALLOC) |
61 void OnGetGpuTcmalloc(); | 60 void OnGetGpuTcmalloc(); |
62 #endif | 61 #endif |
63 | 62 |
64 #if defined(OS_WIN) | 63 #if defined(OS_WIN) |
65 static void CollectDxDiagnostics(GpuChildThread* thread); | 64 static void CollectDxDiagnostics(GpuChildThread* thread); |
66 static void SetDxDiagnostics(GpuChildThread* thread, | 65 static void SetDxDiagnostics(GpuChildThread* thread, |
67 const content::DxDiagNode& node); | 66 const content::DxDiagNode& node); |
68 #endif | 67 #endif |
69 | 68 |
70 // Set this flag to true if a fatal error occurred before we receive the | |
71 // OnInitialize message, in which case we just declare ourselves DOA. | |
72 bool dead_on_arrival_; | |
73 base::Time process_start_time_; | 69 base::Time process_start_time_; |
74 scoped_refptr<GpuWatchdogThread> watchdog_thread_; | 70 scoped_refptr<GpuWatchdogThread> watchdog_thread_; |
75 | 71 |
76 #if defined(OS_WIN) | 72 #if defined(OS_WIN) |
77 // Windows specific client sandbox interface. | 73 // Windows specific client sandbox interface. |
78 sandbox::TargetServices* target_services_; | 74 sandbox::TargetServices* target_services_; |
79 | 75 |
80 // Indicates whether DirectX Diagnostics collection is ongoing. | 76 // Indicates whether DirectX Diagnostics collection is ongoing. |
81 bool collecting_dx_diagnostics_; | 77 bool collecting_dx_diagnostics_; |
82 #endif | 78 #endif |
83 | 79 |
84 scoped_ptr<GpuChannelManager> gpu_channel_manager_; | 80 scoped_ptr<GpuChannelManager> gpu_channel_manager_; |
85 | 81 |
86 // Information about the GPU, such as device and vendor ID. | 82 // Information about the GPU, such as device and vendor ID. |
87 content::GPUInfo gpu_info_; | 83 content::GPUInfo gpu_info_; |
88 | 84 |
89 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 85 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
90 }; | 86 }; |
91 | 87 |
92 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 88 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
OLD | NEW |