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 GpuChildThread(const InProcessChildThreadParams& params, | 47 explicit GpuChildThread(const InProcessChildThreadParams& params); |
48 GpuMemoryBufferFactory* gpu_memory_buffer_factory); | |
49 | 48 |
50 ~GpuChildThread() override; | 49 ~GpuChildThread() override; |
51 | 50 |
52 static gfx::GpuMemoryBufferType GetGpuMemoryBufferFactoryType(); | |
53 | |
54 void Shutdown() override; | 51 void Shutdown() override; |
55 | 52 |
56 void Init(const base::Time& process_start_time); | 53 void Init(const base::Time& process_start_time); |
57 void StopWatchdog(); | 54 void StopWatchdog(); |
58 | 55 |
59 // ChildThread overrides. | 56 // ChildThread overrides. |
60 bool Send(IPC::Message* msg) override; | 57 bool Send(IPC::Message* msg) override; |
61 bool OnControlMessageReceived(const IPC::Message& msg) override; | 58 bool OnControlMessageReceived(const IPC::Message& msg) override; |
62 | 59 |
63 private: | 60 private: |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 98 |
102 // The GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. | 99 // The GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. |
103 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; | 100 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; |
104 | 101 |
105 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 102 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
106 }; | 103 }; |
107 | 104 |
108 } // namespace content | 105 } // namespace content |
109 | 106 |
110 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 107 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
OLD | NEW |