| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |