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

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

Issue 2550583002: gpu: Thread-safe command buffer state lookup. (Closed)
Patch Set: jbauman's review Created 4 years 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/client/cmd_buffer_helper.cc ('k') | gpu/command_buffer/client/context_support.h » ('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_test.cc
diff --git a/gpu/command_buffer/client/cmd_buffer_helper_test.cc b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
index 40ae25e700f904d7749271273aaffc4cbdcd497f..3489ea8b8dea5103d57520c3646340d892b864a3 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper_test.cc
+++ b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
@@ -68,7 +68,7 @@ class CommandBufferServiceLocked : public CommandBufferService {
int FlushCount() { return flush_count_; }
- void WaitForGetOffsetInRange(int32_t start, int32_t end) override {
+ State WaitForGetOffsetInRange(int32_t start, int32_t end) override {
// Flush only if it's required to unblock this Wait.
if (last_flush_ != -1 &&
!CommandBuffer::InRange(start, end, previous_put_offset_)) {
@@ -76,7 +76,7 @@ class CommandBufferServiceLocked : public CommandBufferService {
CommandBufferService::Flush(last_flush_);
last_flush_ = -1;
}
- CommandBufferService::WaitForGetOffsetInRange(start, end);
+ return CommandBufferService::WaitForGetOffsetInRange(start, end);
}
private:
@@ -247,7 +247,7 @@ class CommandBufferHelperTest : public testing::Test {
int32_t GetPutOffset() { return command_buffer_->GetPutOffset(); }
- int32_t GetHelperGetOffset() { return helper_->get_offset(); }
+ int32_t GetHelperGetOffset() { return helper_->cached_get_offset_; }
int32_t GetHelperPutOffset() { return helper_->put_; }
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.cc ('k') | gpu/command_buffer/client/context_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698