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

Unified Diff: gpu/command_buffer/service/cmd_parser.h

Issue 2275203002: Make command buffer commands and immediate data volatile (Closed)
Patch Set: std::copy->const_cast+memcpy Created 4 years, 3 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 | « gpu/command_buffer/common/mailbox.h ('k') | gpu/command_buffer/service/cmd_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/cmd_parser.h
diff --git a/gpu/command_buffer/service/cmd_parser.h b/gpu/command_buffer/service/cmd_parser.h
index a8187d7b21425714a3b375344fe5990d5ad49f0e..96514399538e34d46334fc06a1fef0d07208bafb 100644
--- a/gpu/command_buffer/service/cmd_parser.h
+++ b/gpu/command_buffer/service/cmd_parser.h
@@ -68,7 +68,7 @@ class GPU_EXPORT CommandParser {
private:
CommandBufferOffset get_;
CommandBufferOffset put_;
- CommandBufferEntry* buffer_;
+ volatile CommandBufferEntry* buffer_;
int32_t entry_count_;
AsyncAPIInterface* handler_;
};
@@ -88,10 +88,9 @@ class GPU_EXPORT AsyncAPIInterface {
// Returns:
// error::kNoError if no error was found, one of
// error::Error otherwise.
- virtual error::Error DoCommand(
- unsigned int command,
- unsigned int arg_count,
- const void* cmd_data) = 0;
+ virtual error::Error DoCommand(unsigned int command,
+ unsigned int arg_count,
+ const volatile void* cmd_data) = 0;
// Executes multiple commands.
// Parameters:
@@ -100,7 +99,7 @@ class GPU_EXPORT AsyncAPIInterface {
// num_entries: number of sequential command buffer entries in buffer.
// entries_processed: if not 0, is set to the number of entries processed.
virtual error::Error DoCommands(unsigned int num_commands,
- const void* buffer,
+ const volatile void* buffer,
int num_entries,
int* entries_processed);
« no previous file with comments | « gpu/command_buffer/common/mailbox.h ('k') | gpu/command_buffer/service/cmd_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698