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

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

Issue 465040: Added CommandBufferClient, CommandBufferStub and some IPC messages.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/fenced_allocator.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
===================================================================
--- gpu/command_buffer/client/cmd_buffer_helper_test.cc (revision 34314)
+++ gpu/command_buffer/client/cmd_buffer_helper_test.cc (working copy)
@@ -40,10 +40,10 @@
#include "gpu/command_buffer/service/gpu_processor.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace command_buffer {
+namespace gpu {
-using command_buffer::CommandBufferService;
-using command_buffer::GPUProcessor;
+using gpu::CommandBufferService;
+using gpu::GPUProcessor;
using testing::Return;
using testing::Mock;
using testing::Truly;
@@ -53,7 +53,8 @@
using testing::_;
const int32 kNumCommandEntries = 10;
-const int32 kCommandBufferSizeBytes = kNumCommandEntries * sizeof(int32);
+const int32 kCommandBufferSizeBytes =
+ kNumCommandEntries * sizeof(CommandBufferEntry);
// Test fixture for CommandBufferHelper test - Creates a CommandBufferHelper,
// using a CommandBufferEngine with a mock AsyncAPIInterface for its interface
@@ -67,14 +68,12 @@
EXPECT_CALL(*api_mock_, DoCommand(0, 0, _))
.WillRepeatedly(Return(parse_error::kParseNoError));
- base::SharedMemory* ring_buffer = new base::SharedMemory;
- ring_buffer->Create(std::wstring(), false, false, kCommandBufferSizeBytes);
- ring_buffer->Map(1024);
-
command_buffer_.reset(new CommandBufferService);
- command_buffer_->Initialize(ring_buffer);
+ base::SharedMemory* ring_buffer = command_buffer_->Initialize(
+ kNumCommandEntries);
- parser_ = new command_buffer::CommandParser(ring_buffer->memory(),
+
+ parser_ = new gpu::CommandParser(ring_buffer->memory(),
kCommandBufferSizeBytes,
0,
kCommandBufferSizeBytes,
@@ -140,7 +139,7 @@
MessageLoop message_loop_;
scoped_ptr<AsyncAPIMock> api_mock_;
scoped_ptr<CommandBufferService> command_buffer_;
- command_buffer::CommandParser* parser_;
+ gpu::CommandParser* parser_;
scoped_ptr<CommandBufferHelper> helper_;
Sequence sequence_;
};
@@ -295,4 +294,4 @@
EXPECT_EQ(parse_error::kParseNoError, command_buffer_->ResetParseError());
}
-} // namespace command_buffer
+} // namespace gpu
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.cc ('k') | gpu/command_buffer/client/fenced_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698