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

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

Issue 8566059: Add CommandBuffer::SetGetBuffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: etc Created 9 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
Index: gpu/command_buffer/client/fenced_allocator_test.cc
diff --git a/gpu/command_buffer/client/fenced_allocator_test.cc b/gpu/command_buffer/client/fenced_allocator_test.cc
index 1aeaaeeab9ed61c3b3937ef3b8cff3f10e0df4c1..abc30767894b276a5c2eb200d975401f6436b2b1 100644
--- a/gpu/command_buffer/client/fenced_allocator_test.cc
+++ b/gpu/command_buffer/client/fenced_allocator_test.cc
@@ -44,15 +44,9 @@ class BaseFencedAllocatorTest : 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_));
@@ -63,6 +57,12 @@ class BaseFencedAllocatorTest : 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() {

Powered by Google App Engine
This is Rietveld 408576698