Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(588)

Unified Diff: command_buffer/service/cross/gapi_decoder.h

Issue 329046: Splits the command buffers into common commands... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: command_buffer/service/cross/gapi_decoder.h
===================================================================
--- command_buffer/service/cross/gapi_decoder.h (revision 30289)
+++ command_buffer/service/cross/gapi_decoder.h (working copy)
@@ -36,25 +36,22 @@
#define O3D_COMMAND_BUFFER_SERVICE_CROSS_GAPI_DECODER_H_
#include "core/cross/types.h"
-#include "command_buffer/service/cross/cmd_parser.h"
+#include "command_buffer/service/cross/common_decoder.h"
#include "command_buffer/common/cross/o3d_cmd_format.h"
namespace o3d {
namespace command_buffer {
-
-class CommandBufferEngine;
-
namespace o3d {
class GAPIInterface;
// This class implements the AsyncAPIInterface interface, decoding GAPI
// commands and sending them to a GAPI interface.
-class GAPIDecoder : public AsyncAPIInterface {
+class GAPIDecoder : public CommonDecoder {
public:
typedef parse_error::ParseError ParseError;
- explicit GAPIDecoder(GAPIInterface *gapi) : gapi_(gapi), engine_(NULL) {}
+ explicit GAPIDecoder(GAPIInterface *gapi) : gapi_(gapi) {}
virtual ~GAPIDecoder() {}
// Overridden from AsyncAPIInterface.
@@ -62,24 +59,10 @@
unsigned int arg_count,
const void* args);
- // Sets the engine, to get shared memory buffers from, and to set the token
- // to.
- void set_engine(CommandBufferEngine *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
- // size.
- // Parameters:
- // shm_id: the id of the shared memory buffer.
- // offset: the offset of the data in the shared memory buffer.
- // size: the size of the data.
- // Returns:
- // NULL if shm_id isn't a valid shared memory buffer ID or if the size
- // check fails. Return a pointer to the data otherwise.
- void *GetAddressAndCheckSize(unsigned int shm_id,
- unsigned int offset,
- unsigned int size);
+ // Overridden from AsyncAPIInterface.
+ virtual const char* GetCommandName(unsigned int command_id) const;
+ private:
// Generate a member function prototype for each command in an automated and
// typesafe way.
#define O3D_COMMAND_BUFFER_CMD_OP(name) \
@@ -92,7 +75,6 @@
#undef O3D_COMMAND_BUFFER_CMD_OP
GAPIInterface *gapi_;
- CommandBufferEngine *engine_;
};
} // namespace o3d

Powered by Google App Engine
This is Rietveld 408576698