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

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

Issue 2736693003: GpuMain: Fix thread_runner() access DCHECK fail (Closed)
Patch Set: Created 3 years, 9 months 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/in_process_command_buffer.h" 9 #include "gpu/ipc/in_process_command_buffer.h"
10 #include "gpu/ipc/service/gpu_init.h" 10 #include "gpu/ipc/service/gpu_init.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 cc::mojom::DisplayCompositorRequest pending_display_compositor_request_; 79 cc::mojom::DisplayCompositorRequest pending_display_compositor_request_;
80 cc::mojom::DisplayCompositorClientPtrInfo 80 cc::mojom::DisplayCompositorClientPtrInfo
81 pending_display_compositor_client_info_; 81 pending_display_compositor_client_info_;
82 82
83 std::unique_ptr<DisplayCompositor> display_compositor_; 83 std::unique_ptr<DisplayCompositor> display_compositor_;
84 84
85 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_; 85 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
86 86
87 // The main thread for Gpu. 87 // The main thread for Gpu.
88 base::Thread gpu_thread_; 88 base::Thread gpu_thread_;
89 scoped_refptr<base::SingleThreadTaskRunner> gpu_thread_task_runner_;
89 90
90 // The thread that handles IO events for Gpu. 91 // The thread that handles IO events for Gpu.
91 base::Thread io_thread_; 92 base::Thread io_thread_;
92 93
93 // The display compositor gets its own thread in mus-gpu. The gpu service, 94 // The display compositor gets its own thread in mus-gpu. The gpu service,
94 // where GL commands are processed resides on its own thread. Various 95 // where GL commands are processed resides on its own thread. Various
95 // components of the display compositor such as Display, ResourceProvider, 96 // components of the display compositor such as Display, ResourceProvider,
96 // and GLRenderer block on sync tokens from other command buffers. Thus, 97 // and GLRenderer block on sync tokens from other command buffers. Thus,
97 // the gpu service must live on a separate thread. 98 // the gpu service must live on a separate thread.
98 base::Thread compositor_thread_; 99 base::Thread compositor_thread_;
100 scoped_refptr<base::SingleThreadTaskRunner> compositor_thread_task_runner_;
99 101
100 mojo::Binding<mojom::GpuMain> binding_; 102 mojo::Binding<mojom::GpuMain> binding_;
101 103
102 DISALLOW_COPY_AND_ASSIGN(GpuMain); 104 DISALLOW_COPY_AND_ASSIGN(GpuMain);
103 }; 105 };
104 106
105 } // namespace ui 107 } // namespace ui
106 108
107 #endif // SERVICES_UI_GPU_GPU_MAIN_H_ 109 #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