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

Unified Diff: gpu/command_buffer/client/cmd_buffer_helper.h

Issue 555129: Add commands Jump, Call and Return... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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
« no previous file with comments | « no previous file | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/cmd_buffer_helper.h
===================================================================
--- gpu/command_buffer/client/cmd_buffer_helper.h (revision 37239)
+++ gpu/command_buffer/client/cmd_buffer_helper.h (working copy)
@@ -55,49 +55,6 @@
// the size of the buffer minus one.
void WaitForAvailableEntries(int32 count);
- // Adds a command data to the command buffer. This may wait until sufficient
- // space is available.
- // Parameters:
- // entries: The command entries to add.
- // count: The number of entries.
- void AddCommandData(const CommandBufferEntry* entries, int32 count) {
- WaitForAvailableEntries(count);
- for (; count > 0; --count) {
- entries_[put_++] = *entries++;
- }
- DCHECK_LE(put_, entry_count_);
- if (put_ == entry_count_) put_ = 0;
- }
-
- // A typed version of AddCommandData.
- template <typename T>
- void AddTypedCmdData(const T& cmd) {
- AddCommandData(reinterpret_cast<const CommandBufferEntry*>(&cmd),
- ComputeNumEntries(sizeof(cmd)));
- }
-
- // Adds a command to the command buffer. This may wait until sufficient space
- // is available.
- // Parameters:
- // command: the command index.
- // arg_count: the number of arguments for the command.
- // args: the arguments for the command (these are copied before the
- // function returns).
- void AddCommand(int32 command,
- int32 arg_count,
- const CommandBufferEntry *args) {
- CommandHeader header;
- header.size = arg_count + 1;
- header.command = command;
- WaitForAvailableEntries(header.size);
- entries_[put_++].value_header = header;
- for (int i = 0; i < arg_count; ++i) {
- entries_[put_++] = args[i];
- }
- DCHECK_LE(put_, entry_count_);
- if (put_ == entry_count_) put_ = 0;
- }
-
// Inserts a new token into the command buffer. This token either has a value
// different from previously inserted tokens, or ensures that previously
// inserted tokens with that value have already passed through the command
« no previous file with comments | « no previous file | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698