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/gles2_cmd_decoder_unittest_base.h

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/gles2_cmd_decoder_unittest_base.h
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
index ae343d5f563227eaa323df1a7c068c8c2a0d0a19..7fdeab0d6bda5abd0b6dddcdbae50cddb640f883 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
@@ -75,17 +75,15 @@ class GLES2DecoderTestBase : public ::testing::TestWithParam<bool> {
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);
}
template <typename T>

Powered by Google App Engine
This is Rietveld 408576698