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

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

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/client_test_helper.h ('k') | gpu/command_buffer/client/cmd_buffer_helper_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/client_test_helper.cc
diff --git a/gpu/command_buffer/client/client_test_helper.cc b/gpu/command_buffer/client/client_test_helper.cc
index 8c633efebe14435bcfd39e2d88dea1c9f42bb3df..3c50f6b20cc2bb5753fc8ee6ef07bab66ff8aae9 100644
--- a/gpu/command_buffer/client/client_test_helper.cc
+++ b/gpu/command_buffer/client/client_test_helper.cc
@@ -15,7 +15,7 @@ using ::testing::Invoke;
namespace gpu {
-MockCommandBufferBase::MockCommandBufferBase() {
+MockCommandBufferBase::MockCommandBufferBase() : put_offset_(0) {
}
MockCommandBufferBase::~MockCommandBufferBase() {
@@ -40,7 +40,7 @@ void MockCommandBufferBase::SetGetOffset(int32 get_offset) {
void MockCommandBufferBase::WaitForTokenInRange(int32 start, int32 end) {}
void MockCommandBufferBase::WaitForGetOffsetInRange(int32 start, int32 end) {
- state_.get_offset = state_.put_offset;
+ state_.get_offset = put_offset_;
OnFlush();
}
@@ -48,7 +48,6 @@ void MockCommandBufferBase::SetGetBuffer(int transfer_buffer_id) {
ring_buffer_buffer_ = GetTransferBuffer(transfer_buffer_id);
ring_buffer_ =
static_cast<CommandBufferEntry*>(ring_buffer_buffer_->memory());
- state_.num_entries = ring_buffer_buffer_->size() / sizeof(ring_buffer_[0]);
state_.token = 10000; // All token checks in the tests should pass.
}
@@ -91,7 +90,7 @@ scoped_refptr<Buffer> MockCommandBufferBase::GetTransferBuffer(int32 id) {
}
void MockCommandBufferBase::FlushHelper(int32 put_offset) {
- state_.put_offset = put_offset;
+ put_offset_ = put_offset;
}
void MockCommandBufferBase::SetToken(int32 token) {
@@ -110,6 +109,10 @@ void MockCommandBufferBase::SetContextLostReason(
state_.context_lost_reason = reason;
}
+int32 MockCommandBufferBase::GetPutOffset() {
+ return put_offset_;
+}
+
// GCC requires these declarations, but MSVC requires they not be present
#ifndef _MSC_VER
const int32 MockCommandBufferBase::kTransferBufferBaseId;
« no previous file with comments | « gpu/command_buffer/client/client_test_helper.h ('k') | gpu/command_buffer/client/cmd_buffer_helper_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698