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

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: First draft 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 18 matching lines...) Expand all
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(
36 size_t width, 36 size_t width,
37 size_t height, 37 size_t height,
38 unsigned internalformat, 38 unsigned internalformat,
39 gfx::GpuMemoryBuffer::Usage usage,
39 int32* id) OVERRIDE; 40 int32* id) OVERRIDE;
40 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; 41 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE;
41 virtual uint32 InsertSyncPoint() OVERRIDE; 42 virtual uint32 InsertSyncPoint() OVERRIDE;
42 virtual void SignalSyncPoint(uint32 sync_point, 43 virtual void SignalSyncPoint(uint32 sync_point,
43 const base::Closure& callback) OVERRIDE; 44 const base::Closure& callback) OVERRIDE;
44 virtual void SignalQuery(uint32 query, 45 virtual void SignalQuery(uint32 query,
45 const base::Closure& callback) OVERRIDE; 46 const base::Closure& callback) OVERRIDE;
46 virtual void SetSurfaceVisible(bool visible) OVERRIDE; 47 virtual void SetSurfaceVisible(bool visible) OVERRIDE;
47 virtual void SendManagedMemoryStats(const ManagedMemoryStats& stats) 48 virtual void SendManagedMemoryStats(const ManagedMemoryStats& stats)
48 OVERRIDE; 49 OVERRIDE;
49 virtual void Echo(const base::Closure& callback) OVERRIDE; 50 virtual void Echo(const base::Closure& callback) OVERRIDE;
50 virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE; 51 virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE;
51 52
52 // Register an existing gpu memory buffer and get an ID that can be used 53 // Register an existing gpu memory buffer and get an ID that can be used
53 // to identify it in the command buffer. 54 // to identify it in the command buffer.
54 bool RegisterGpuMemoryBuffer(int32 id, 55 bool RegisterGpuMemoryBuffer(int32 id,
55 gfx::GpuMemoryBufferHandle buffer, 56 gfx::GpuMemoryBufferHandle buffer,
56 size_t width, 57 size_t width,
57 size_t height, 58 size_t height,
58 unsigned internalformat); 59 unsigned internalformat,
60 unsigned usage);
59 61
60 private: 62 private:
61 GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager_; 63 GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager_;
62 GpuMemoryBufferFactory* gpu_memory_buffer_factory_; 64 GpuMemoryBufferFactory* gpu_memory_buffer_factory_;
63 gles2::MailboxManager* mailbox_manager_; 65 gles2::MailboxManager* mailbox_manager_;
64 gles2::QueryManager* query_manager_; 66 gles2::QueryManager* query_manager_;
65 typedef std::map<int32, linked_ptr<gfx::GpuMemoryBuffer> > GpuMemoryBufferMap; 67 typedef std::map<int32, linked_ptr<gfx::GpuMemoryBuffer> > GpuMemoryBufferMap;
66 GpuMemoryBufferMap gpu_memory_buffers_; 68 GpuMemoryBufferMap gpu_memory_buffers_;
67 gpu::Capabilities capabilities_; 69 gpu::Capabilities capabilities_;
68 70
69 DISALLOW_COPY_AND_ASSIGN(GpuControlService); 71 DISALLOW_COPY_AND_ASSIGN(GpuControlService);
70 }; 72 };
71 73
72 } // namespace gpu 74 } // namespace gpu
73 75
74 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_ 76 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698