OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // This file defines the CommandBufferEngine class, providing the main loop for | 5 // This file defines the CommandBufferEngine class, providing the main loop for |
6 // the service, exposing the RPC API, managing the command parser. | 6 // the service, exposing the RPC API, managing the command parser. |
7 | 7 |
8 #ifndef GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_ | 8 #ifndef GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_ |
9 #define GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_ | 9 #define GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_ |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "gpu/command_buffer/common/buffer.h" |
12 | 13 |
13 namespace gpu { | 14 namespace gpu { |
14 | 15 |
15 class CommandBufferEngine { | 16 class CommandBufferEngine { |
16 public: | 17 public: |
17 CommandBufferEngine() { | 18 CommandBufferEngine() { |
18 } | 19 } |
19 | 20 |
20 virtual ~CommandBufferEngine() { | 21 virtual ~CommandBufferEngine() { |
21 } | 22 } |
22 | 23 |
23 // Gets the base address of a registered shared memory buffer. | 24 // Gets the base address and size of a registered shared memory buffer. |
24 // Parameters: | 25 // Parameters: |
25 // shm_id: the identifier for the shared memory buffer. | 26 // shm_id: the identifier for the shared memory buffer. |
26 virtual void *GetSharedMemoryAddress(int32 shm_id) = 0; | 27 virtual Buffer GetSharedMemoryBuffer(int32 shm_id) = 0; |
27 | |
28 // Gets the size of a registered shared memory buffer. | |
29 // Parameters: | |
30 // shm_id: the identifier for the shared memory buffer. | |
31 virtual size_t GetSharedMemorySize(int32 shm_id) = 0; | |
32 | 28 |
33 // Sets the token value. | 29 // Sets the token value. |
34 virtual void set_token(int32 token) = 0; | 30 virtual void set_token(int32 token) = 0; |
35 | 31 |
36 private: | 32 private: |
37 DISALLOW_COPY_AND_ASSIGN(CommandBufferEngine); | 33 DISALLOW_COPY_AND_ASSIGN(CommandBufferEngine); |
38 }; | 34 }; |
39 | 35 |
40 } // namespace gpu | 36 } // namespace gpu |
41 | 37 |
42 #endif // GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_ | 38 #endif // GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_ |
OLD | NEW |