| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 gpu::SurfaceHandle child_window) override; | 104 gpu::SurfaceHandle child_window) override; |
| 105 #endif | 105 #endif |
| 106 void SetActiveURL(const GURL& url) override; | 106 void SetActiveURL(const GURL& url) override; |
| 107 | 107 |
| 108 // mojom::GpuService: | 108 // mojom::GpuService: |
| 109 void EstablishGpuChannel( | 109 void EstablishGpuChannel( |
| 110 int32_t client_id, | 110 int32_t client_id, |
| 111 uint64_t client_tracing_id, | 111 uint64_t client_tracing_id, |
| 112 bool is_gpu_host, | 112 bool is_gpu_host, |
| 113 const EstablishGpuChannelCallback& callback) override; | 113 const EstablishGpuChannelCallback& callback) override; |
| 114 void CloseChannel(int32_t client_id) override; |
| 114 void CreateGpuMemoryBuffer( | 115 void CreateGpuMemoryBuffer( |
| 115 gfx::GpuMemoryBufferId id, | 116 gfx::GpuMemoryBufferId id, |
| 116 const gfx::Size& size, | 117 const gfx::Size& size, |
| 117 gfx::BufferFormat format, | 118 gfx::BufferFormat format, |
| 118 gfx::BufferUsage usage, | 119 gfx::BufferUsage usage, |
| 119 int client_id, | 120 int client_id, |
| 120 gpu::SurfaceHandle surface_handle, | 121 gpu::SurfaceHandle surface_handle, |
| 121 const CreateGpuMemoryBufferCallback& callback) override; | 122 const CreateGpuMemoryBufferCallback& callback) override; |
| 122 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, | 123 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
| 123 int client_id, | 124 int client_id, |
| 124 const gpu::SyncToken& sync_token) override; | 125 const gpu::SyncToken& sync_token) override; |
| 125 void GetVideoMemoryUsageStats( | 126 void GetVideoMemoryUsageStats( |
| 126 const GetVideoMemoryUsageStatsCallback& callback) override; | 127 const GetVideoMemoryUsageStatsCallback& callback) override; |
| 128 void LoadedShader(const std::string& data) override; |
| 129 void DestroyingVideoSurface( |
| 130 int32_t surface_id, |
| 131 const DestroyingVideoSurfaceCallback& callback) override; |
| 132 void WakeUpGpu() override; |
| 127 | 133 |
| 128 scoped_refptr<base::SingleThreadTaskRunner> io_runner_; | 134 scoped_refptr<base::SingleThreadTaskRunner> io_runner_; |
| 129 | 135 |
| 130 // An event that will be signalled when we shutdown. | 136 // An event that will be signalled when we shutdown. |
| 131 base::WaitableEvent shutdown_event_; | 137 base::WaitableEvent shutdown_event_; |
| 132 | 138 |
| 133 std::unique_ptr<gpu::GpuWatchdogThread> watchdog_thread_; | 139 std::unique_ptr<gpu::GpuWatchdogThread> watchdog_thread_; |
| 134 | 140 |
| 135 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory_; | 141 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory_; |
| 136 | 142 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 152 gpu::SyncPointManager* sync_point_manager_ = nullptr; | 158 gpu::SyncPointManager* sync_point_manager_ = nullptr; |
| 153 | 159 |
| 154 mojo::BindingSet<mojom::GpuService> bindings_; | 160 mojo::BindingSet<mojom::GpuService> bindings_; |
| 155 | 161 |
| 156 DISALLOW_COPY_AND_ASSIGN(GpuService); | 162 DISALLOW_COPY_AND_ASSIGN(GpuService); |
| 157 }; | 163 }; |
| 158 | 164 |
| 159 } // namespace ui | 165 } // namespace ui |
| 160 | 166 |
| 161 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_ | 167 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_ |
| OLD | NEW |