OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 15 matching lines...) Expand all Loading... |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 | 32 |
33 // This file defines the CommandBufferEngine class, providing the main loop for | 33 // This file defines the CommandBufferEngine class, providing the main loop for |
34 // the service, exposing the RPC API, managing the command parser. | 34 // the service, exposing the RPC API, managing the command parser. |
35 | 35 |
36 #ifndef GPU_COMMAND_BUFFER_SERVICE_CROSS_CMD_BUFFER_ENGINE_H_ | 36 #ifndef GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_ |
37 #define GPU_COMMAND_BUFFER_SERVICE_CROSS_CMD_BUFFER_ENGINE_H_ | 37 #define GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_ |
38 | 38 |
39 #include "base/basictypes.h" | 39 #include "base/basictypes.h" |
40 | 40 |
41 namespace command_buffer { | 41 namespace gpu { |
42 | 42 |
43 class CommandBufferEngine { | 43 class CommandBufferEngine { |
44 public: | 44 public: |
45 CommandBufferEngine() { | 45 CommandBufferEngine() { |
46 } | 46 } |
47 | 47 |
48 virtual ~CommandBufferEngine() { | 48 virtual ~CommandBufferEngine() { |
49 } | 49 } |
50 | 50 |
51 // Gets the base address of a registered shared memory buffer. | 51 // Gets the base address of a registered shared memory buffer. |
52 // Parameters: | 52 // Parameters: |
53 // shm_id: the identifier for the shared memory buffer. | 53 // shm_id: the identifier for the shared memory buffer. |
54 virtual void *GetSharedMemoryAddress(int32 shm_id) = 0; | 54 virtual void *GetSharedMemoryAddress(int32 shm_id) = 0; |
55 | 55 |
56 // Gets the size of a registered shared memory buffer. | 56 // Gets the size of a registered shared memory buffer. |
57 // Parameters: | 57 // Parameters: |
58 // shm_id: the identifier for the shared memory buffer. | 58 // shm_id: the identifier for the shared memory buffer. |
59 virtual size_t GetSharedMemorySize(int32 shm_id) = 0; | 59 virtual size_t GetSharedMemorySize(int32 shm_id) = 0; |
60 | 60 |
61 // Sets the token value. | 61 // Sets the token value. |
62 virtual void set_token(int32 token) = 0; | 62 virtual void set_token(int32 token) = 0; |
63 | 63 |
64 private: | 64 private: |
65 DISALLOW_COPY_AND_ASSIGN(CommandBufferEngine); | 65 DISALLOW_COPY_AND_ASSIGN(CommandBufferEngine); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace command_buffer | 68 } // namespace gpu |
69 | 69 |
70 #endif // GPU_COMMAND_BUFFER_SERVICE_CROSS_CMD_BUFFER_ENGINE_H_ | 70 #endif // GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_ |
OLD | NEW |