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

Unified Diff: gpu/command_buffer/service/common_decoder_unittest.cc

Issue 558513003: command_buffer: Batch command processing to reduce handler overheads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a bad return in DoCommand(). Created 6 years, 3 months 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/service/common_decoder_unittest.cc
diff --git a/gpu/command_buffer/service/common_decoder_unittest.cc b/gpu/command_buffer/service/common_decoder_unittest.cc
index 11274e05f07a4267cad7df25fcd931be7a4daa53..ddf0c0ac5a2aff7fc1ea0de81e8c0e4813f5b774 100644
--- a/gpu/command_buffer/service/common_decoder_unittest.cc
+++ b/gpu/command_buffer/service/common_decoder_unittest.cc
@@ -167,17 +167,15 @@ class CommonDecoderTest : public testing::Test {
template <typename T>
error::Error ExecuteCmd(const T& cmd) {
COMPILE_ASSERT(T::kArgFlags == cmd::kFixed, Cmd_kArgFlags_not_kFixed);
- return decoder_.DoCommand(cmd.kCmdId,
- ComputeNumEntries(sizeof(cmd)) - 1,
- &cmd);
+ return decoder_.DoCommands(
+ 1, (const void*)&cmd, ComputeNumEntries(sizeof(cmd)), 0);
}
template <typename T>
error::Error ExecuteImmediateCmd(const T& cmd, size_t data_size) {
COMPILE_ASSERT(T::kArgFlags == cmd::kAtLeastN, Cmd_kArgFlags_not_kAtLeastN);
- return decoder_.DoCommand(cmd.kCmdId,
- ComputeNumEntries(sizeof(cmd) + data_size) - 1,
- &cmd);
+ return decoder_.DoCommands(
+ 1, (const void*)&cmd, ComputeNumEntries(sizeof(cmd) + data_size), 0);
}
MockCommandBufferEngine engine_;
@@ -189,6 +187,7 @@ TEST_F(CommonDecoderTest, Initialize) {
}
TEST_F(CommonDecoderTest, DoCommonCommandInvalidCommand) {
+ // TODO(vmiura): fix this
vmiura 2014/09/09 01:16:10 I need to delete this comment.
vmiura 2014/09/09 01:38:56 Done.
EXPECT_EQ(error::kUnknownCommand, decoder_.DoCommand(999999, 0, NULL));
}

Powered by Google App Engine
This is Rietveld 408576698