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 <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 class GpuChildThread : public ChildThreadImpl { | 37 class GpuChildThread : public ChildThreadImpl { |
38 public: | 38 public: |
39 typedef std::queue<IPC::Message*> DeferredMessages; | 39 typedef std::queue<IPC::Message*> DeferredMessages; |
40 | 40 |
41 GpuChildThread(GpuWatchdogThread* gpu_watchdog_thread, | 41 GpuChildThread(GpuWatchdogThread* gpu_watchdog_thread, |
42 bool dead_on_arrival, | 42 bool dead_on_arrival, |
43 const gpu::GPUInfo& gpu_info, | 43 const gpu::GPUInfo& gpu_info, |
44 const DeferredMessages& deferred_messages, | 44 const DeferredMessages& deferred_messages, |
45 GpuMemoryBufferFactory* gpu_memory_buffer_factory); | 45 GpuMemoryBufferFactory* gpu_memory_buffer_factory); |
46 | 46 |
47 explicit GpuChildThread(const InProcessChildThreadParams& params); | 47 GpuChildThread(const InProcessChildThreadParams& params, |
| 48 GpuMemoryBufferFactory* gpu_memory_buffer_factory); |
48 | 49 |
49 ~GpuChildThread() override; | 50 ~GpuChildThread() override; |
50 | 51 |
| 52 static gfx::GpuMemoryBufferType GetGpuMemoryBufferFactoryType(); |
| 53 |
51 void Shutdown() override; | 54 void Shutdown() override; |
52 | 55 |
53 void Init(const base::Time& process_start_time); | 56 void Init(const base::Time& process_start_time); |
54 void StopWatchdog(); | 57 void StopWatchdog(); |
55 | 58 |
56 // ChildThread overrides. | 59 // ChildThread overrides. |
57 bool Send(IPC::Message* msg) override; | 60 bool Send(IPC::Message* msg) override; |
58 bool OnControlMessageReceived(const IPC::Message& msg) override; | 61 bool OnControlMessageReceived(const IPC::Message& msg) override; |
59 | 62 |
60 private: | 63 private: |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 101 |
99 // The GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. | 102 // The GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. |
100 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; | 103 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; |
101 | 104 |
102 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 105 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
103 }; | 106 }; |
104 | 107 |
105 } // namespace content | 108 } // namespace content |
106 | 109 |
107 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 110 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
OLD | NEW |