Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "gpu/command_buffer/common/buffer.h" |
| 13 | 13 |
| 14 namespace gfx { | |
| 15 class GLImage; | |
| 16 } | |
| 17 | |
| 14 namespace gpu { | 18 namespace gpu { |
| 15 | 19 |
| 16 class CommandBufferEngine { | 20 class CommandBufferEngine { |
| 17 public: | 21 public: |
| 18 CommandBufferEngine() { | 22 CommandBufferEngine() { |
| 19 } | 23 } |
| 20 | 24 |
| 21 virtual ~CommandBufferEngine() { | 25 virtual ~CommandBufferEngine() { |
| 22 } | 26 } |
| 23 | 27 |
| 24 // Gets the base address and size of a registered shared memory buffer. | 28 // Gets the base address and size of a registered shared memory buffer. |
| 25 // Parameters: | 29 // Parameters: |
| 26 // shm_id: the identifier for the shared memory buffer. | 30 // shm_id: the identifier for the shared memory buffer. |
| 27 virtual Buffer GetSharedMemoryBuffer(int32 shm_id) = 0; | 31 virtual Buffer GetSharedMemoryBuffer(int32 shm_id) = 0; |
| 28 | 32 |
| 29 // Sets the token value. | 33 // Sets the token value. |
| 30 virtual void set_token(int32 token) = 0; | 34 virtual void set_token(int32 token) = 0; |
| 31 | 35 |
| 32 // Sets the shared memory buffer used for commands. | 36 // Sets the shared memory buffer used for commands. |
| 33 virtual bool SetGetBuffer(int32 transfer_buffer_id) = 0; | 37 virtual bool SetGetBuffer(int32 transfer_buffer_id) = 0; |
| 34 | 38 |
| 35 // Sets the "get" pointer. Return false if offset is out of range. | 39 // Sets the "get" pointer. Return false if offset is out of range. |
| 36 virtual bool SetGetOffset(int32 offset) = 0; | 40 virtual bool SetGetOffset(int32 offset) = 0; |
| 37 | 41 |
| 38 // Gets the "get" pointer. | 42 // Gets the "get" pointer. |
| 39 virtual int32 GetGetOffset() = 0; | 43 virtual int32 GetGetOffset() = 0; |
| 40 | 44 |
| 45 // Gets the image associated with a registered image ID. | |
| 46 virtual gfx::GLImage* GetImage(int32 image_id) = 0; | |
|
piman
2013/08/01 21:19:30
Same comment here - I think this is exposed at a t
reveman
2013/08/08 23:19:00
Removed it.
| |
| 47 | |
| 41 private: | 48 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(CommandBufferEngine); | 49 DISALLOW_COPY_AND_ASSIGN(CommandBufferEngine); |
| 43 }; | 50 }; |
| 44 | 51 |
| 45 } // namespace gpu | 52 } // namespace gpu |
| 46 | 53 |
| 47 #endif // GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_ | 54 #endif // GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_ |
| OLD | NEW |