OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CLIENT_GPU_CONTROL_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 18 matching lines...) Expand all Loading... |
29 virtual ~GpuControl() {} | 29 virtual ~GpuControl() {} |
30 | 30 |
31 virtual Capabilities GetCapabilities() = 0; | 31 virtual Capabilities GetCapabilities() = 0; |
32 | 32 |
33 // Create a gpu memory buffer of the given dimensions and format. Returns | 33 // Create a gpu memory buffer of the given dimensions and format. Returns |
34 // its ID or -1 on error. | 34 // its ID or -1 on error. |
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 unsigned usage, |
39 int32_t* id) = 0; | 40 int32_t* id) = 0; |
40 | 41 |
41 // Destroy a gpu memory buffer. The ID must be positive. | 42 // Destroy a gpu memory buffer. The ID must be positive. |
42 virtual void DestroyGpuMemoryBuffer(int32_t id) = 0; | 43 virtual void DestroyGpuMemoryBuffer(int32_t id) = 0; |
43 | 44 |
44 // Inserts a sync point, returning its ID. Sync point IDs are global and can | 45 // Inserts a sync point, returning its ID. Sync point IDs are global and can |
45 // be used for cross-context synchronization. | 46 // be used for cross-context synchronization. |
46 virtual uint32_t InsertSyncPoint() = 0; | 47 virtual uint32_t InsertSyncPoint() = 0; |
47 | 48 |
48 // Runs |callback| when a sync point is reached. | 49 // Runs |callback| when a sync point is reached. |
(...skipping 15 matching lines...) Expand all Loading... |
64 // returns a stream identifier. | 65 // returns a stream identifier. |
65 virtual uint32_t CreateStreamTexture(uint32_t texture_id) = 0; | 66 virtual uint32_t CreateStreamTexture(uint32_t texture_id) = 0; |
66 | 67 |
67 private: | 68 private: |
68 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 69 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
69 }; | 70 }; |
70 | 71 |
71 } // namespace gpu | 72 } // namespace gpu |
72 | 73 |
73 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 74 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
OLD | NEW |