| 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_MUS_H_ | 5 #ifndef SERVICES_UI_GPU_GPU_SERVICE_MUS_H_ |
| 6 #define SERVICES_UI_GPU_GPU_SERVICE_MUS_H_ | 6 #define SERVICES_UI_GPU_GPU_SERVICE_MUS_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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 class MusGpuMemoryBufferManager; | 45 class MusGpuMemoryBufferManager; |
| 46 | 46 |
| 47 // TODO(fsamuel): GpuServiceMus is intended to be the Gpu thread within Mus. | 47 // TODO(fsamuel): GpuServiceMus is intended to be the Gpu thread within Mus. |
| 48 // Similar to GpuChildThread, it is a GpuChannelManagerDelegate and will have a | 48 // Similar to GpuChildThread, it is a GpuChannelManagerDelegate and will have a |
| 49 // GpuChannelManager. | 49 // GpuChannelManager. |
| 50 class GpuServiceMus : public gpu::GpuChannelManagerDelegate, | 50 class GpuServiceMus : public gpu::GpuChannelManagerDelegate, |
| 51 public gpu::GpuChannelHostFactory, | 51 public gpu::GpuChannelHostFactory, |
| 52 public base::NonThreadSafe { | 52 public base::NonThreadSafe { |
| 53 public: | 53 public: |
| 54 typedef base::Callback<void(int client_id, const IPC::ChannelHandle&)> | 54 typedef base::Callback<void(int client_id, IPC::ChannelHandle*)> |
| 55 EstablishGpuChannelCallback; | 55 EstablishGpuChannelCallback; |
| 56 void EstablishGpuChannel(uint64_t client_tracing_id, | 56 void EstablishGpuChannel(uint64_t client_tracing_id, |
| 57 bool preempts, | 57 bool preempts, |
| 58 bool allow_view_command_buffers, | 58 bool allow_view_command_buffers, |
| 59 bool allow_real_time_streams, | 59 bool allow_real_time_streams, |
| 60 const EstablishGpuChannelCallback& callback); | 60 const EstablishGpuChannelCallback& callback); |
| 61 gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( | 61 gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( |
| 62 gfx::GpuMemoryBufferId id, | 62 gfx::GpuMemoryBufferId id, |
| 63 const gfx::Size& size, | 63 const gfx::Size& size, |
| 64 gfx::BufferFormat format, | 64 gfx::BufferFormat format, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 // Information about the GPU, such as device and vendor ID. | 165 // Information about the GPU, such as device and vendor ID. |
| 166 gpu::GPUInfo gpu_info_; | 166 gpu::GPUInfo gpu_info_; |
| 167 | 167 |
| 168 DISALLOW_COPY_AND_ASSIGN(GpuServiceMus); | 168 DISALLOW_COPY_AND_ASSIGN(GpuServiceMus); |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 } // namespace ui | 171 } // namespace ui |
| 172 | 172 |
| 173 #endif // SERVICES_UI_GPU_GPU_SERVICE_MUS_H_ | 173 #endif // SERVICES_UI_GPU_GPU_SERVICE_MUS_H_ |
| OLD | NEW |