| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // Overridden from GpuControl: | 24 // Overridden from GpuControl: |
| 25 virtual bool SupportsGpuMemoryBuffer() OVERRIDE; | 25 virtual bool SupportsGpuMemoryBuffer() OVERRIDE; |
| 26 | 26 |
| 27 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer( | 27 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer( |
| 28 size_t width, | 28 size_t width, |
| 29 size_t height, | 29 size_t height, |
| 30 unsigned internalformat, | 30 unsigned internalformat, |
| 31 int32* id) OVERRIDE; | 31 int32* id) OVERRIDE; |
| 32 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; | 32 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; |
| 33 virtual uint32 InsertSyncPoint() OVERRIDE; |
| 34 virtual void SignalSyncPoint(uint32 sync_point, |
| 35 const base::Closure& callback) OVERRIDE; |
| 33 | 36 |
| 34 // Register an existing gpu memory buffer and get an ID that can be used | 37 // Register an existing gpu memory buffer and get an ID that can be used |
| 35 // to identify it in the command buffer. | 38 // to identify it in the command buffer. |
| 36 bool RegisterGpuMemoryBuffer(int32 id, | 39 bool RegisterGpuMemoryBuffer(int32 id, |
| 37 gfx::GpuMemoryBufferHandle buffer, | 40 gfx::GpuMemoryBufferHandle buffer, |
| 38 size_t width, | 41 size_t width, |
| 39 size_t height, | 42 size_t height, |
| 40 unsigned internalformat); | 43 unsigned internalformat); |
| 41 | 44 |
| 42 private: | 45 private: |
| 43 GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager_; | 46 GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager_; |
| 44 GpuMemoryBufferFactory* gpu_memory_buffer_factory_; | 47 GpuMemoryBufferFactory* gpu_memory_buffer_factory_; |
| 45 typedef std::map<int32, linked_ptr<gfx::GpuMemoryBuffer> > GpuMemoryBufferMap; | 48 typedef std::map<int32, linked_ptr<gfx::GpuMemoryBuffer> > GpuMemoryBufferMap; |
| 46 GpuMemoryBufferMap gpu_memory_buffers_; | 49 GpuMemoryBufferMap gpu_memory_buffers_; |
| 47 | 50 |
| 48 DISALLOW_COPY_AND_ASSIGN(GpuControlService); | 51 DISALLOW_COPY_AND_ASSIGN(GpuControlService); |
| 49 }; | 52 }; |
| 50 | 53 |
| 51 } // namespace gpu | 54 } // namespace gpu |
| 52 | 55 |
| 53 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_ | 56 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_ |
| OLD | NEW |