| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ |
| 6 #define SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Overridden from gpu::GpuMemoryBufferManager: | 48 // Overridden from gpu::GpuMemoryBufferManager: |
| 49 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 49 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
| 50 const gfx::Size& size, | 50 const gfx::Size& size, |
| 51 gfx::BufferFormat format, | 51 gfx::BufferFormat format, |
| 52 gfx::BufferUsage usage, | 52 gfx::BufferUsage usage, |
| 53 gpu::SurfaceHandle surface_handle) override; | 53 gpu::SurfaceHandle surface_handle) override; |
| 54 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( | 54 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( |
| 55 const gfx::GpuMemoryBufferHandle& handle, | 55 const gfx::GpuMemoryBufferHandle& handle, |
| 56 const gfx::Size& size, | 56 const gfx::Size& size, |
| 57 gfx::BufferFormat format) override; | 57 gfx::BufferFormat format) override; |
| 58 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( | |
| 59 ClientBuffer buffer) override; | |
| 60 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, | 58 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, |
| 61 const gpu::SyncToken& sync_token) override; | 59 const gpu::SyncToken& sync_token) override; |
| 62 int counter_ = 0; | 60 int counter_ = 0; |
| 63 // TODO(sad): Explore the option of doing this from an existing thread. | 61 // TODO(sad): Explore the option of doing this from an existing thread. |
| 64 base::Thread thread_; | 62 base::Thread thread_; |
| 65 mojom::GpuServicePtr gpu_service_; | 63 mojom::GpuServicePtr gpu_service_; |
| 66 std::unique_ptr<service_manager::Connector> connector_; | 64 std::unique_ptr<service_manager::Connector> connector_; |
| 67 base::WeakPtrFactory<MojoGpuMemoryBufferManager> weak_ptr_factory_; | 65 base::WeakPtrFactory<MojoGpuMemoryBufferManager> weak_ptr_factory_; |
| 68 | 66 |
| 69 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager); | 67 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager); |
| 70 }; | 68 }; |
| 71 | 69 |
| 72 } // namespace ui | 70 } // namespace ui |
| 73 | 71 |
| 74 #endif // SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ | 72 #endif // SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ |
| OLD | NEW |