| 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/task/cancelable_task_tracker.h" | 10 #include "base/task/cancelable_task_tracker.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 gfx::GpuMemoryBufferId id, | 132 gfx::GpuMemoryBufferId id, |
| 133 const gfx::Size& size, | 133 const gfx::Size& size, |
| 134 gfx::BufferFormat format, | 134 gfx::BufferFormat format, |
| 135 gfx::BufferUsage usage, | 135 gfx::BufferUsage usage, |
| 136 int client_id, | 136 int client_id, |
| 137 gpu::SurfaceHandle surface_handle, | 137 gpu::SurfaceHandle surface_handle, |
| 138 const CreateGpuMemoryBufferCallback& callback) override; | 138 const CreateGpuMemoryBufferCallback& callback) override; |
| 139 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, | 139 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
| 140 int client_id, | 140 int client_id, |
| 141 const gpu::SyncToken& sync_token) override; | 141 const gpu::SyncToken& sync_token) override; |
| 142 void GetGpuMemoryBufferAttribs( |
| 143 const GetGpuMemoryBufferAttribsCallback& callback) override; |
| 142 void GetVideoMemoryUsageStats( | 144 void GetVideoMemoryUsageStats( |
| 143 const GetVideoMemoryUsageStatsCallback& callback) override; | 145 const GetVideoMemoryUsageStatsCallback& callback) override; |
| 144 void RequestCompleteGpuInfo( | 146 void RequestCompleteGpuInfo( |
| 145 const RequestCompleteGpuInfoCallback& callback) override; | 147 const RequestCompleteGpuInfoCallback& callback) override; |
| 146 void LoadedShader(const std::string& data) override; | 148 void LoadedShader(const std::string& data) override; |
| 147 void DestroyingVideoSurface( | 149 void DestroyingVideoSurface( |
| 148 int32_t surface_id, | 150 int32_t surface_id, |
| 149 const DestroyingVideoSurfaceCallback& callback) override; | 151 const DestroyingVideoSurfaceCallback& callback) override; |
| 150 void WakeUpGpu() override; | 152 void WakeUpGpu() override; |
| 151 void GpuSwitched() override; | 153 void GpuSwitched() override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 163 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_; | 165 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_; |
| 164 | 166 |
| 165 gpu::GpuPreferences gpu_preferences_; | 167 gpu::GpuPreferences gpu_preferences_; |
| 166 | 168 |
| 167 // Information about the GPU, such as device and vendor ID. | 169 // Information about the GPU, such as device and vendor ID. |
| 168 gpu::GPUInfo gpu_info_; | 170 gpu::GPUInfo gpu_info_; |
| 169 | 171 |
| 170 // Information about general chrome feature support for the GPU. | 172 // Information about general chrome feature support for the GPU. |
| 171 gpu::GpuFeatureInfo gpu_feature_info_; | 173 gpu::GpuFeatureInfo gpu_feature_info_; |
| 172 | 174 |
| 175 // GpuMemoryBufferAttribs that are supported for all gfx::BufferUsage flags. |
| 176 gfx::GpuMemoryBufferAttribVector gpu_memory_buffer_attribs_; |
| 177 |
| 173 scoped_refptr<mojom::ThreadSafeGpuHostPtr> gpu_host_; | 178 scoped_refptr<mojom::ThreadSafeGpuHostPtr> gpu_host_; |
| 174 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; | 179 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; |
| 175 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_; | 180 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_; |
| 176 | 181 |
| 177 // On some platforms (e.g. android webview), the SyncPointManager comes from | 182 // On some platforms (e.g. android webview), the SyncPointManager comes from |
| 178 // external sources. | 183 // external sources. |
| 179 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_; | 184 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_; |
| 180 gpu::SyncPointManager* sync_point_manager_ = nullptr; | 185 gpu::SyncPointManager* sync_point_manager_ = nullptr; |
| 181 | 186 |
| 182 // An event that will be signalled when we shutdown. On some platforms it | 187 // An event that will be signalled when we shutdown. On some platforms it |
| (...skipping 11 matching lines...) Expand all Loading... |
| 194 | 199 |
| 195 base::WeakPtr<GpuService> weak_ptr_; | 200 base::WeakPtr<GpuService> weak_ptr_; |
| 196 base::WeakPtrFactory<GpuService> weak_ptr_factory_; | 201 base::WeakPtrFactory<GpuService> weak_ptr_factory_; |
| 197 | 202 |
| 198 DISALLOW_COPY_AND_ASSIGN(GpuService); | 203 DISALLOW_COPY_AND_ASSIGN(GpuService); |
| 199 }; | 204 }; |
| 200 | 205 |
| 201 } // namespace ui | 206 } // namespace ui |
| 202 | 207 |
| 203 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_ | 208 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_ |
| OLD | NEW |