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

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

Issue 2763493002: gpu: Use mojom API for recording log messages to the host. (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 | « content/gpu/gpu_child_thread.cc ('k') | services/ui/gpu/gpu_service.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_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/threading/non_thread_safe.h" 10 #include "base/threading/non_thread_safe.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 gpu::GpuChannelManager* gpu_channel_manager() { 68 gpu::GpuChannelManager* gpu_channel_manager() {
69 return gpu_channel_manager_.get(); 69 return gpu_channel_manager_.get();
70 } 70 }
71 71
72 gpu::GpuWatchdogThread* watchdog_thread() { return watchdog_thread_.get(); } 72 gpu::GpuWatchdogThread* watchdog_thread() { return watchdog_thread_.get(); }
73 73
74 const gpu::GpuFeatureInfo& gpu_feature_info() const { 74 const gpu::GpuFeatureInfo& gpu_feature_info() const {
75 return gpu_feature_info_; 75 return gpu_feature_info_;
76 } 76 }
77 77
78 void set_in_host_process(bool in_host_process) {
79 in_host_process_ = in_host_process;
80 }
81
78 private: 82 private:
79 friend class GpuMain; 83 friend class GpuMain;
80 84
85 void RecordLogMessage(int severity,
86 size_t message_start,
87 const std::string& message);
88
81 gpu::SyncPointManager* sync_point_manager() { return sync_point_manager_; } 89 gpu::SyncPointManager* sync_point_manager() { return sync_point_manager_; }
82 90
83 gpu::gles2::MailboxManager* mailbox_manager() { 91 gpu::gles2::MailboxManager* mailbox_manager() {
84 return gpu_channel_manager_->mailbox_manager(); 92 return gpu_channel_manager_->mailbox_manager();
85 } 93 }
86 94
87 gl::GLShareGroup* share_group() { 95 gl::GLShareGroup* share_group() {
88 return gpu_channel_manager_->share_group(); 96 return gpu_channel_manager_->share_group();
89 } 97 }
90 98
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 165
158 scoped_refptr<mojom::ThreadSafeGpuHostPtr> gpu_host_; 166 scoped_refptr<mojom::ThreadSafeGpuHostPtr> gpu_host_;
159 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; 167 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_;
160 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_; 168 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_;
161 169
162 // On some platforms (e.g. android webview), the SyncPointManager comes from 170 // On some platforms (e.g. android webview), the SyncPointManager comes from
163 // external sources. 171 // external sources.
164 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_; 172 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_;
165 gpu::SyncPointManager* sync_point_manager_ = nullptr; 173 gpu::SyncPointManager* sync_point_manager_ = nullptr;
166 174
175 // Whether this is running in the same process as the gpu host.
176 bool in_host_process_ = false;
177
167 mojo::BindingSet<mojom::GpuService> bindings_; 178 mojo::BindingSet<mojom::GpuService> bindings_;
168 179
169 DISALLOW_COPY_AND_ASSIGN(GpuService); 180 DISALLOW_COPY_AND_ASSIGN(GpuService);
170 }; 181 };
171 182
172 } // namespace ui 183 } // namespace ui
173 184
174 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_ 185 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_
OLDNEW
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | services/ui/gpu/gpu_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698