Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: gpu/command_buffer/service/gpu_control_service.h

Issue 255713008: Change glimage to accept a type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698