Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 GpuControlService(GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager, | 25 GpuControlService(GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager, |
| 26 GpuMemoryBufferFactory* gpu_memory_buffer_factory, | 26 GpuMemoryBufferFactory* gpu_memory_buffer_factory, |
| 27 gles2::MailboxManager* mailbox_manager, | 27 gles2::MailboxManager* mailbox_manager, |
| 28 gles2::QueryManager* query_manager, | 28 gles2::QueryManager* query_manager, |
| 29 const gpu::Capabilities& decoder_capabilities); | 29 const gpu::Capabilities& decoder_capabilities); |
| 30 virtual ~GpuControlService(); | 30 virtual ~GpuControlService(); |
| 31 | 31 |
| 32 | 32 |
| 33 // GpuControl implementation. | 33 // GpuControl implementation. |
| 34 virtual gpu::Capabilities GetCapabilities() OVERRIDE; | 34 virtual gpu::Capabilities GetCapabilities() OVERRIDE; |
| 35 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer( | 35 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(size_t width, |
| 36 size_t width, | 36 size_t height, |
| 37 size_t height, | 37 unsigned internalformat, |
| 38 unsigned internalformat, | 38 unsigned usage, |
| 39 int32* id) OVERRIDE; | 39 int32* id) OVERRIDE; |
| 40 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; | 40 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; |
| 41 virtual uint32 InsertSyncPoint() OVERRIDE; | 41 virtual uint32 InsertSyncPoint() OVERRIDE; |
| 42 virtual void SignalSyncPoint(uint32 sync_point, | 42 virtual void SignalSyncPoint(uint32 sync_point, |
| 43 const base::Closure& callback) OVERRIDE; | 43 const base::Closure& callback) OVERRIDE; |
| 44 virtual void SignalQuery(uint32 query, | 44 virtual void SignalQuery(uint32 query, |
| 45 const base::Closure& callback) OVERRIDE; | 45 const base::Closure& callback) OVERRIDE; |
| 46 virtual void SetSurfaceVisible(bool visible) OVERRIDE; | 46 virtual void SetSurfaceVisible(bool visible) OVERRIDE; |
| 47 virtual void SendManagedMemoryStats(const ManagedMemoryStats& stats) | 47 virtual void SendManagedMemoryStats(const ManagedMemoryStats& stats) |
| 48 OVERRIDE; | 48 OVERRIDE; |
| 49 virtual void Echo(const base::Closure& callback) OVERRIDE; | 49 virtual void Echo(const base::Closure& callback) OVERRIDE; |
| 50 virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE; | 50 virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE; |
| 51 | 51 |
| 52 // Register an existing gpu memory buffer and get an ID that can be used | 52 // Register an existing gpu memory buffer and get an ID that can be used |
| 53 // to identify it in the command buffer. | 53 // to identify it in the command buffer. |
| 54 bool RegisterGpuMemoryBuffer(int32 id, | 54 bool RegisterGpuMemoryBuffer(int32 id, |
| 55 gfx::GpuMemoryBufferHandle buffer, | 55 gfx::GpuMemoryBufferHandle buffer, |
| 56 size_t width, | 56 size_t width, |
| 57 size_t height, | 57 size_t height, |
| 58 unsigned internalformat); | 58 unsigned internalformat, |
| 59 unsigned usage); | |
|
reveman
2014/05/01 12:06:38
Does the GPU service really need to know about usa
alexst (slow to review)
2014/05/01 13:44:51
I suppose it's not strictly necessary, I was goin
reveman
2014/05/01 13:48:46
Let's avoid it for now and we can add it later if
| |
| 59 | 60 |
| 60 private: | 61 private: |
| 61 GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager_; | 62 GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager_; |
| 62 GpuMemoryBufferFactory* gpu_memory_buffer_factory_; | 63 GpuMemoryBufferFactory* gpu_memory_buffer_factory_; |
| 63 gles2::MailboxManager* mailbox_manager_; | 64 gles2::MailboxManager* mailbox_manager_; |
| 64 gles2::QueryManager* query_manager_; | 65 gles2::QueryManager* query_manager_; |
| 65 typedef std::map<int32, linked_ptr<gfx::GpuMemoryBuffer> > GpuMemoryBufferMap; | 66 typedef std::map<int32, linked_ptr<gfx::GpuMemoryBuffer> > GpuMemoryBufferMap; |
| 66 GpuMemoryBufferMap gpu_memory_buffers_; | 67 GpuMemoryBufferMap gpu_memory_buffers_; |
| 67 gpu::Capabilities capabilities_; | 68 gpu::Capabilities capabilities_; |
| 68 | 69 |
| 69 DISALLOW_COPY_AND_ASSIGN(GpuControlService); | 70 DISALLOW_COPY_AND_ASSIGN(GpuControlService); |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 } // namespace gpu | 73 } // namespace gpu |
| 73 | 74 |
| 74 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_ | 75 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_ |
| OLD | NEW |