Convert sync_unit_tests to run exclusively on Swarming
[chromium-blink-merge.git] / content / gpu / in_process_gpu_thread.h
blob37167303fd128d3d4fc96d436eb29395040770f0
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.
5 #ifndef CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_
6 #define CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_
8 #include "base/threading/thread.h"
9 #include "content/common/content_export.h"
10 #include "content/common/in_process_child_thread_params.h"
12 namespace content {
14 class GpuMemoryBufferFactory;
15 class GpuProcess;
17 // This class creates a GPU thread (instead of a GPU process), when running
18 // with --in-process-gpu or --single-process.
19 class InProcessGpuThread : public base::Thread {
20 public:
21 InProcessGpuThread(const InProcessChildThreadParams& params);
22 ~InProcessGpuThread() override;
24 protected:
25 void Init() override;
26 void CleanUp() override;
28 private:
29 InProcessChildThreadParams params_;
31 // Deleted in CleanUp() on the gpu thread, so don't use smart pointers.
32 GpuProcess* gpu_process_;
34 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
36 DISALLOW_COPY_AND_ASSIGN(InProcessGpuThread);
39 CONTENT_EXPORT base::Thread* CreateInProcessGpuThread(
40 const InProcessChildThreadParams& params);
42 } // namespace content
44 #endif // CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_