OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_GPU_GPU_MAIN_THREAD_H_ |
| 6 #define CONTENT_GPU_GPU_MAIN_THREAD_H_ |
| 7 |
| 8 #include "base/threading/thread.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 class GpuProcess; |
| 13 |
| 14 // This class creates a GPU thread (instead of a GPU process), when running |
| 15 // with --in-process-gpu or --single-process. |
| 16 class GpuMainThread : public base::Thread { |
| 17 public: |
| 18 explicit GpuMainThread(const std::string& channel_id); |
| 19 virtual ~GpuMainThread(); |
| 20 |
| 21 protected: |
| 22 virtual void Init() OVERRIDE; |
| 23 virtual void CleanUp() OVERRIDE; |
| 24 |
| 25 private: |
| 26 std::string channel_id_; |
| 27 // Deleted in CleanUp() on the gpu thread, so don't use smart pointers. |
| 28 GpuProcess* gpu_process_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(GpuMainThread); |
| 31 }; |
| 32 |
| 33 base::Thread* CreateGpuMainThread(const std::string& channel_id); |
| 34 |
| 35 } // namespace content |
| 36 |
| 37 #endif // CONTENT_GPU_GPU_MAIN_THREAD_H_ |
OLD | NEW |