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

Unified Diff: gpu/command_buffer/client/ring_buffer_test.cc

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/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/common/cmd_buffer_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/ring_buffer_test.cc
diff --git a/gpu/command_buffer/client/ring_buffer_test.cc b/gpu/command_buffer/client/ring_buffer_test.cc
index dfc4bf5ea9e912fe0f9f6afcebd8622996d46a2f..26124d397e2d9e71a20a6bb5f2512a257b0267a2 100644
--- a/gpu/command_buffer/client/ring_buffer_test.cc
+++ b/gpu/command_buffer/client/ring_buffer_test.cc
@@ -38,9 +38,9 @@ class BaseRingBufferTest : public testing::Test {
static const unsigned int kAlignment = 4;
void RunPendingSetToken() {
- for (std::vector<const void*>::iterator it = set_token_arguments_.begin();
- it != set_token_arguments_.end();
- ++it) {
+ for (std::vector<const volatile void*>::iterator it =
+ set_token_arguments_.begin();
+ it != set_token_arguments_.end(); ++it) {
api_mock_->SetToken(cmd::kSetToken, 1, *it);
}
set_token_arguments_.clear();
@@ -49,7 +49,7 @@ class BaseRingBufferTest : public testing::Test {
void SetToken(unsigned int command,
unsigned int arg_count,
- const void* _args) {
+ const volatile void* _args) {
EXPECT_EQ(static_cast<unsigned int>(cmd::kSetToken), command);
EXPECT_EQ(1u, arg_count);
if (delay_set_token_)
@@ -98,7 +98,7 @@ class BaseRingBufferTest : public testing::Test {
std::unique_ptr<CommandBufferService> command_buffer_;
std::unique_ptr<CommandExecutor> executor_;
std::unique_ptr<CommandBufferHelper> helper_;
- std::vector<const void*> set_token_arguments_;
+ std::vector<const volatile void*> set_token_arguments_;
bool delay_set_token_;
std::unique_ptr<int8_t[]> buffer_;
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/common/cmd_buffer_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698