Chromium Code Reviews| Index: gpu/command_buffer/service/mocks.cc |
| diff --git a/gpu/command_buffer/service/mocks.cc b/gpu/command_buffer/service/mocks.cc |
| index 40b3d6d924fd06e78b4753640724ebdc244e5997..c59cb56426c4f33ed7d46587741940b1f3b0ce97 100644 |
| --- a/gpu/command_buffer/service/mocks.cc |
| +++ b/gpu/command_buffer/service/mocks.cc |
| @@ -2,6 +2,7 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +#include "base/threading/thread.h" |
| #include "gpu/command_buffer/service/mocks.h" |
| namespace gpu { |
| @@ -24,6 +25,20 @@ void AsyncAPIMock::SetToken(unsigned int command, |
| engine_->set_token(args->token); |
| } |
| +SpecializedAsyncAPIMock::SpecializedAsyncAPIMock() {} |
|
apatrick_chromium
2011/06/03 18:58:52
The name does not describe what the specialized mo
jbates
2011/06/03 21:27:32
Done. But not Slow, because it is still a generic
|
| + |
| +SpecializedAsyncAPIMock::~SpecializedAsyncAPIMock() {} |
| + |
| +error::Error SpecializedAsyncAPIMock::DoCommand(unsigned int command, |
| + unsigned int arg_count, |
| + const void* cmd_data) { |
| + if (command == kTestPauseCommand) { |
| + // 3 ms sleep, to surpass the 2ms cutoff in GpuScheduler |
| + base::PlatformThread::Sleep(3); |
|
apatrick_chromium
2011/06/03 18:58:52
I fear this is going to make the test flaky if the
jbates
2011/06/03 21:27:32
Done.
|
| + } |
| + return AsyncAPIMock::DoCommand(command, arg_count, cmd_data); |
| +} |
| + |
| namespace gles2 { |
| MockShaderTranslator::MockShaderTranslator() {} |