diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-17 00:07:20 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-17 00:07:20 +0000 |
commit | d26e0dc9edbb20145628cb25c65db63dc2664844 (patch) | |
tree | e36831e1e47b19d2456b6014efd0306d12960a6a /o3d/command_buffer/service/cross/cmd_parser.h | |
parent | 0ca1ccdea35a265e21b30ec6e5c5b002d5f5afc3 (diff) | |
download | chromium_src-d26e0dc9edbb20145628cb25c65db63dc2664844.zip chromium_src-d26e0dc9edbb20145628cb25c65db63dc2664844.tar.gz chromium_src-d26e0dc9edbb20145628cb25c65db63dc2664844.tar.bz2 |
Changing command buffer to use structs instead of
arrays, step 1
I hope I'm not stepping on any toes here. I wanted
to write some command buffer code but I didn't want
to go poking values into arrays so I thought I'd
attempt to refactor a little. I hope I'm not steping
on any toes.
Some answers to possible questions.
O3D_COMMAND_ARGS_FLAG_AT_LEAST_N is a macro because
it needs to be a compile time constant so I can generate
the table.
All the commands with a FixMe are to be done in another
CL.
The Structs don't follow the style guide because it's
just busy work to match up SET_TOKEN and SetToken.
It seems like a reasonable exception to me. This way
the functions, IDs and structs all match easily
and therefore lists that use them be automatically
generated and kept in sync.
The next step is I want to uncompress some of the
commands. As an example, it doesn't seem like
CreateTexture2D should squeeze width and height into
16bits halfs of a 32bit value. This API is not targeted
at machines with 2K of memory and the amount of code
and other scaffolding around decoding those 2 16bit
halfs far outways saving 16bits in a command that
allocates a texture. It also makes it harder to use
the command because the person generating it has to
also go through the same hoops.
Review URL: http://codereview.chromium.org/206020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26421 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/command_buffer/service/cross/cmd_parser.h')
-rw-r--r-- | o3d/command_buffer/service/cross/cmd_parser.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/o3d/command_buffer/service/cross/cmd_parser.h b/o3d/command_buffer/service/cross/cmd_parser.h index 511e52b..9c3a145 100644 --- a/o3d/command_buffer/service/cross/cmd_parser.h +++ b/o3d/command_buffer/service/cross/cmd_parser.h @@ -104,7 +104,7 @@ class AsyncAPIInterface { virtual BufferSyncInterface::ParseError DoCommand( unsigned int command, unsigned int arg_count, - CommandBufferEntry *args) = 0; + const void* args) = 0; }; } // namespace command_buffer |