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

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

Issue 6993032: GpuScheduler using time quantum to avoid too many PostTasks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: name change Created 9 years, 7 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
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.cc ('k') | gpu/command_buffer/service/mocks.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gpu_scheduler_unittest.cc
diff --git a/gpu/command_buffer/service/gpu_scheduler_unittest.cc b/gpu/command_buffer/service/gpu_scheduler_unittest.cc
index 965353c43c5c0ea55d80b01542d2146624f67726..8cdb3615d8c0def616c96b650c9abd44986f97a1 100644
--- a/gpu/command_buffer/service/gpu_scheduler_unittest.cc
+++ b/gpu/command_buffer/service/gpu_scheduler_unittest.cc
@@ -44,7 +44,7 @@ class GpuSchedulerTest : public testing::Test {
ON_CALL(*command_buffer_.get(), GetState())
.WillByDefault(Return(default_state));
- async_api_.reset(new StrictMock<AsyncAPIMock>);
+ async_api_.reset(new StrictMock<SpecializedDoCommandAsyncAPIMock>);
decoder_ = new gles2::MockGLES2Decoder();
@@ -161,11 +161,12 @@ TEST_F(GpuSchedulerTest, SchedulerSetsTheGLContext) {
}
TEST_F(GpuSchedulerTest, PostsTaskToFinishRemainingCommands) {
+ unsigned int pauseCmd = SpecializedDoCommandAsyncAPIMock::kTestQuantumCommand;
CommandHeader* header = reinterpret_cast<CommandHeader*>(&buffer_[0]);
header[0].command = 7;
header[0].size = 2;
buffer_[1] = 123;
- header[2].command = 8;
+ header[2].command = pauseCmd;
header[2].size = 1;
header[3].command = 9;
header[3].size = 1;
@@ -180,7 +181,7 @@ TEST_F(GpuSchedulerTest, PostsTaskToFinishRemainingCommands) {
.WillOnce(Return(error::kNoError));
EXPECT_CALL(*command_buffer_, SetGetOffset(2));
- EXPECT_CALL(*async_api_, DoCommand(8, 0, &buffer_[2]))
+ EXPECT_CALL(*async_api_, DoCommand(pauseCmd, 0, &buffer_[2]))
.WillOnce(Return(error::kNoError));
EXPECT_CALL(*command_buffer_, SetGetOffset(3));
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.cc ('k') | gpu/command_buffer/service/mocks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698