Index: o3d/gpu_plugin/command_buffer.h |
=================================================================== |
--- o3d/gpu_plugin/command_buffer.h (revision 25348) |
+++ o3d/gpu_plugin/command_buffer.h (working copy) |
@@ -5,14 +5,15 @@ |
#ifndef O3D_GPU_PLUGIN_COMMAND_BUFFER_H_ |
#define O3D_GPU_PLUGIN_COMMAND_BUFFER_H_ |
-#include "o3d/gpu_plugin/np_utils/dispatched_np_object.h" |
+#include "o3d/gpu_plugin/np_utils/default_np_object.h" |
+#include "o3d/gpu_plugin/np_utils/np_dispatcher.h" |
namespace o3d { |
namespace gpu_plugin { |
// An NPObject that implements a shared memory command buffer and a synchronous |
// API to manage the put and get pointers. |
-class CommandBuffer : public DispatchedNPObject { |
+class CommandBuffer : public DefaultNPObject<NPObject> { |
public: |
explicit CommandBuffer(NPP npp); |
virtual ~CommandBuffer(); |
@@ -29,8 +30,7 @@ |
// The client calls this to get the servers current get offset. |
virtual int32 GetGetOffset(); |
- protected: |
- NP_UTILS_BEGIN_DISPATCHER_CHAIN(CommandBuffer, DispatchedNPObject) |
+ NP_UTILS_BEGIN_DISPATCHER_CHAIN(CommandBuffer, DefaultNPObject<NPObject>) |
NP_UTILS_DISPATCHER(Initialize, bool(int32)) |
NP_UTILS_DISPATCHER(SetPutOffset, void(int32)) |
NP_UTILS_DISPATCHER(GetGetOffset, int32()) |
@@ -38,6 +38,7 @@ |
NP_UTILS_END_DISPATCHER_CHAIN |
private: |
+ NPP npp_; |
NPObjectPointer<NPObject> buffer_object_; |
NPSharedMemory* shared_memory_; |
}; |