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 eb5a0cb4d90bd12d67223d8f4e71d93c47cbd694..8b8e46e1ae829d42a8ef3d982b4b2ae41c570c65 100644 |
--- a/gpu/command_buffer/client/ring_buffer_test.cc |
+++ b/gpu/command_buffer/client/ring_buffer_test.cc |
@@ -65,15 +65,9 @@ class BaseRingBufferTest : public testing::Test { |
Return(error::kNoError))); |
command_buffer_.reset(new CommandBufferService); |
- command_buffer_->Initialize(kBufferSize); |
- Buffer ring_buffer = command_buffer_->GetRingBuffer(); |
+ command_buffer_->Initialize(); |
- parser_ = new CommandParser(ring_buffer.ptr, |
- ring_buffer.size, |
- 0, |
- ring_buffer.size, |
- 0, |
- api_mock_.get()); |
+ parser_ = new CommandParser(api_mock_.get()); |
gpu_scheduler_.reset(new GpuScheduler( |
command_buffer_.get(), NULL, parser_)); |
@@ -88,6 +82,12 @@ class BaseRingBufferTest : public testing::Test { |
helper_.reset(new CommandBufferHelper(command_buffer_.get())); |
helper_->Initialize(kBufferSize); |
+ |
+ // Note: parser->SetBuffer would normally be called through |
+ // helper_->Initialize but currently it needs a GpuCommandBufferStub as the |
+ // CommandBuffer instead of the CommandBufferService for that to happen. |
+ Buffer ring_buffer = helper_->get_ring_buffer(); |
+ parser_->SetBuffer(ring_buffer.ptr, ring_buffer.size, 0, ring_buffer.size); |
} |
int32 GetToken() { |