diff options
Diffstat (limited to 'o3d/command_buffer')
-rw-r--r-- | o3d/command_buffer/service/cross/cmd_buffer_engine.h | 28 | ||||
-rw-r--r-- | o3d/command_buffer/service/cross/gapi_decoder.h | 6 | ||||
-rw-r--r-- | o3d/command_buffer/service/win/d3d9/gapi_d3d9.h | 1 |
3 files changed, 31 insertions, 4 deletions
diff --git a/o3d/command_buffer/service/cross/cmd_buffer_engine.h b/o3d/command_buffer/service/cross/cmd_buffer_engine.h index 572d98f..479c267 100644 --- a/o3d/command_buffer/service/cross/cmd_buffer_engine.h +++ b/o3d/command_buffer/service/cross/cmd_buffer_engine.h @@ -46,7 +46,33 @@ namespace command_buffer { class BufferRPCImpl; -class CommandBufferEngine : public BufferSyncInterface { +class CommandBufferUpcallInterface { + public: + CommandBufferUpcallInterface() { + } + + virtual ~CommandBufferUpcallInterface() { + } + + // Gets the base address of a registered shared memory buffer. + // Parameters: + // shm_id: the identifier for the shared memory buffer. + virtual void *GetSharedMemoryAddress(unsigned int shm_id) = 0; + + // Gets the size of a registered shared memory buffer. + // Parameters: + // shm_id: the identifier for the shared memory buffer. + virtual size_t GetSharedMemorySize(unsigned int shm_id) = 0; + + // Sets the token value. + virtual void set_token(unsigned int token) = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(CommandBufferUpcallInterface); +}; + +class CommandBufferEngine : public BufferSyncInterface, + public CommandBufferUpcallInterface { public: explicit CommandBufferEngine(AsyncAPIInterface *handler); virtual ~CommandBufferEngine(); diff --git a/o3d/command_buffer/service/cross/gapi_decoder.h b/o3d/command_buffer/service/cross/gapi_decoder.h index a9af75c..e75376c 100644 --- a/o3d/command_buffer/service/cross/gapi_decoder.h +++ b/o3d/command_buffer/service/cross/gapi_decoder.h @@ -42,7 +42,7 @@ namespace o3d { namespace command_buffer { class GAPIInterface; -class CommandBufferEngine; +class CommandBufferUpcallInterface; // This class implements the AsyncAPIInterface interface, decoding GAPI // commands and sending them to a GAPI interface. @@ -60,7 +60,7 @@ class GAPIDecoder : public AsyncAPIInterface { // Sets the engine, to get shared memory buffers from, and to set the token // to. - void set_engine(CommandBufferEngine *engine) { engine_ = engine; } + void set_engine(CommandBufferUpcallInterface *engine) { engine_ = engine; } private: // Gets the address of shared memory data, given a shared memory ID and an // offset. Also checks that the size is consistent with the shared memory @@ -88,7 +88,7 @@ class GAPIDecoder : public AsyncAPIInterface { #undef O3D_COMMAND_BUFFER_CMD_OP GAPIInterface *gapi_; - CommandBufferEngine *engine_; + CommandBufferUpcallInterface *engine_; }; } // namespace command_buffer diff --git a/o3d/command_buffer/service/win/d3d9/gapi_d3d9.h b/o3d/command_buffer/service/win/d3d9/gapi_d3d9.h index eb301ba..f4a9b4a 100644 --- a/o3d/command_buffer/service/win/d3d9/gapi_d3d9.h +++ b/o3d/command_buffer/service/win/d3d9/gapi_d3d9.h @@ -54,6 +54,7 @@ class GAPID3D9 : public GAPIInterface { virtual ~GAPID3D9();
void set_hwnd(HWND hwnd) { hwnd_ = hwnd; }
+ HWND hwnd() const { return hwnd_; }
// Initializes the graphics context, bound to a window.
// Returns:
|