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

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

Issue 2764753004: mus-gpu: Talk to the GpuHost from the IO thread. (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_service.cc » ('j') | services/ui/gpu/gpu_service.cc » ('J')
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_SERVICE_H_ 5 #ifndef SERVICES_UI_GPU_GPU_SERVICE_H_
6 #define SERVICES_UI_GPU_GPU_SERVICE_H_ 6 #define SERVICES_UI_GPU_GPU_SERVICE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/task/cancelable_task_tracker.h"
10 #include "base/threading/non_thread_safe.h" 11 #include "base/threading/non_thread_safe.h"
11 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" 14 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
14 #include "gpu/command_buffer/common/activity_flags.h" 15 #include "gpu/command_buffer/common/activity_flags.h"
15 #include "gpu/command_buffer/service/gpu_preferences.h" 16 #include "gpu/command_buffer/service/gpu_preferences.h"
16 #include "gpu/config/gpu_info.h" 17 #include "gpu/config/gpu_info.h"
17 #include "gpu/ipc/common/surface_handle.h" 18 #include "gpu/ipc/common/surface_handle.h"
18 #include "gpu/ipc/service/gpu_channel.h" 19 #include "gpu/ipc/service/gpu_channel.h"
19 #include "gpu/ipc/service/gpu_channel_manager.h" 20 #include "gpu/ipc/service/gpu_channel_manager.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 72
72 gpu::GpuWatchdogThread* watchdog_thread() { return watchdog_thread_.get(); } 73 gpu::GpuWatchdogThread* watchdog_thread() { return watchdog_thread_.get(); }
73 74
74 const gpu::GpuFeatureInfo& gpu_feature_info() const { 75 const gpu::GpuFeatureInfo& gpu_feature_info() const {
75 return gpu_feature_info_; 76 return gpu_feature_info_;
76 } 77 }
77 78
78 private: 79 private:
79 friend class GpuMain; 80 friend class GpuMain;
80 81
82 void BindGpuHostOnIO(mojom::GpuHostPtrInfo ptr_info);
83
81 gpu::SyncPointManager* sync_point_manager() { return sync_point_manager_; } 84 gpu::SyncPointManager* sync_point_manager() { return sync_point_manager_; }
82 85
83 gpu::gles2::MailboxManager* mailbox_manager() { 86 gpu::gles2::MailboxManager* mailbox_manager() {
84 return gpu_channel_manager_->mailbox_manager(); 87 return gpu_channel_manager_->mailbox_manager();
85 } 88 }
86 89
87 gl::GLShareGroup* share_group() { 90 gl::GLShareGroup* share_group() {
88 return gpu_channel_manager_->share_group(); 91 return gpu_channel_manager_->share_group();
89 } 92 }
90 93
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory_; 151 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory_;
149 152
150 gpu::GpuPreferences gpu_preferences_; 153 gpu::GpuPreferences gpu_preferences_;
151 154
152 // Information about the GPU, such as device and vendor ID. 155 // Information about the GPU, such as device and vendor ID.
153 gpu::GPUInfo gpu_info_; 156 gpu::GPUInfo gpu_info_;
154 157
155 // Information about general chrome feature support for the GPU. 158 // Information about general chrome feature support for the GPU.
156 gpu::GpuFeatureInfo gpu_feature_info_; 159 gpu::GpuFeatureInfo gpu_feature_info_;
157 160
158 mojom::GpuHostPtr gpu_host_; 161 scoped_refptr<mojom::ThreadSafeGpuHostPtr> gpu_host_;
159 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; 162 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_;
160 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_; 163 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_;
161 164
162 // On some platforms (e.g. android webview), the SyncPointManager comes from 165 // On some platforms (e.g. android webview), the SyncPointManager comes from
163 // external sources. 166 // external sources.
164 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_; 167 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_;
165 gpu::SyncPointManager* sync_point_manager_ = nullptr; 168 gpu::SyncPointManager* sync_point_manager_ = nullptr;
166 169
167 mojo::BindingSet<mojom::GpuService> bindings_; 170 mojo::BindingSet<mojom::GpuService> bindings_;
171 base::CancelableTaskTracker task_tracker_;
168 172
169 DISALLOW_COPY_AND_ASSIGN(GpuService); 173 DISALLOW_COPY_AND_ASSIGN(GpuService);
170 }; 174 };
171 175
172 } // namespace ui 176 } // namespace ui
173 177
174 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_ 178 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | services/ui/gpu/gpu_service.cc » ('j') | services/ui/gpu/gpu_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698