Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: services/ui/gpu/gpu_main.h

Issue 2525213002: Mus: Avoid deadlock during teardown (Closed)
Patch Set: Address Sadrul's comment Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | services/ui/gpu/gpu_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_UI_GPU_GPU_MAIN_H_ 5 #ifndef SERVICES_UI_GPU_GPU_MAIN_H_
6 #define SERVICES_UI_GPU_GPU_MAIN_H_ 6 #define SERVICES_UI_GPU_GPU_MAIN_H_
7 7
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "gpu/ipc/service/gpu_init.h" 9 #include "gpu/ipc/service/gpu_init.h"
10 #include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h" 10 #include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h"
(...skipping 10 matching lines...) Expand all
21 public: 21 public:
22 GpuMain(); 22 GpuMain();
23 ~GpuMain() override; 23 ~GpuMain() override;
24 24
25 void OnStart(); 25 void OnStart();
26 void Create(mojom::GpuServiceInternalRequest request); 26 void Create(mojom::GpuServiceInternalRequest request);
27 27
28 GpuServiceInternal* gpu_service() { return gpu_service_internal_.get(); } 28 GpuServiceInternal* gpu_service() { return gpu_service_internal_.get(); }
29 29
30 private: 30 private:
31 void InitOnGpuThread(); 31 void InitOnGpuThread(
32 scoped_refptr<base::SingleThreadTaskRunner> io_runner,
33 scoped_refptr<base::SingleThreadTaskRunner> compositor_runner);
34
35 void TearDownOnCompositorThread();
32 void TearDownOnGpuThread(); 36 void TearDownOnGpuThread();
33 void CreateOnGpuThread(mojom::GpuServiceInternalRequest request); 37 void CreateOnGpuThread(mojom::GpuServiceInternalRequest request);
34 38
35 // gpu::GpuSandboxHelper: 39 // gpu::GpuSandboxHelper:
36 void PreSandboxStartup() override; 40 void PreSandboxStartup() override;
37 bool EnsureSandboxInitialized( 41 bool EnsureSandboxInitialized(
38 gpu::GpuWatchdogThread* watchdog_thread) override; 42 gpu::GpuWatchdogThread* watchdog_thread) override;
39 43
40 std::unique_ptr<gpu::GpuInit> gpu_init_; 44 std::unique_ptr<gpu::GpuInit> gpu_init_;
41 std::unique_ptr<GpuServiceInternal> gpu_service_internal_; 45 std::unique_ptr<GpuServiceInternal> gpu_service_internal_;
42 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_; 46 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
43 47
44 // The main thread for GpuService. 48 // The main thread for GpuService.
45 base::Thread gpu_thread_; 49 base::Thread gpu_thread_;
46 50
47 // The thread that handles IO events for GpuService. 51 // The thread that handles IO events for GpuService.
48 base::Thread io_thread_; 52 base::Thread io_thread_;
49 53
54 // The thread used for the display compositor.
55 base::Thread compositor_thread_;
56
50 base::WeakPtrFactory<GpuMain> weak_factory_; 57 base::WeakPtrFactory<GpuMain> weak_factory_;
51 58
52 DISALLOW_COPY_AND_ASSIGN(GpuMain); 59 DISALLOW_COPY_AND_ASSIGN(GpuMain);
53 }; 60 };
54 61
55 } // namespace ui 62 } // namespace ui
56 63
57 #endif // SERVICES_UI_GPU_GPU_MAIN_H_ 64 #endif // SERVICES_UI_GPU_GPU_MAIN_H_
OLDNEW
« no previous file with comments | « no previous file | services/ui/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698