cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / content / gpu / in_process_gpu_thread.h
blob6516ba6ae8a71f0de26b0e00382b87b2167e87c9
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 gpu {
13 class SyncPointManager;
16 namespace content {
18 class GpuMemoryBufferFactory;
19 class GpuProcess;
21 // This class creates a GPU thread (instead of a GPU process), when running
22 // with --in-process-gpu or --single-process.
23 class InProcessGpuThread : public base::Thread {
24 public:
25 InProcessGpuThread(const InProcessChildThreadParams& params,
26 gpu::SyncPointManager* sync_point_manager_override);
27 ~InProcessGpuThread() override;
29 protected:
30 void Init() override;
31 void CleanUp() override;
33 private:
34 InProcessChildThreadParams params_;
36 // Deleted in CleanUp() on the gpu thread, so don't use smart pointers.
37 GpuProcess* gpu_process_;
39 // Can be null if overridden.
40 scoped_ptr<gpu::SyncPointManager> sync_point_manager_;
42 // Non-owning.
43 gpu::SyncPointManager* sync_point_manager_override_;
45 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
47 DISALLOW_COPY_AND_ASSIGN(InProcessGpuThread);
50 CONTENT_EXPORT base::Thread* CreateInProcessGpuThread(
51 const InProcessChildThreadParams& params);
53 } // namespace content
55 #endif // CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_