| Index: gpu/command_buffer/service/mocks.cc
|
| diff --git a/gpu/command_buffer/service/mocks.cc b/gpu/command_buffer/service/mocks.cc
|
| index 25598478bf8468986ddf05ef27a06daa1c5a6f07..143ec0b4d84d8d1f9d6b7d0b2073c769848cfd83 100644
|
| --- a/gpu/command_buffer/service/mocks.cc
|
| +++ b/gpu/command_buffer/service/mocks.cc
|
| @@ -7,15 +7,31 @@
|
| #include "gpu/command_buffer/service/gpu_scheduler.h"
|
| #include "gpu/command_buffer/service/mocks.h"
|
|
|
| +using testing::Invoke;
|
| +using testing::_;
|
| +
|
| namespace gpu {
|
|
|
| -AsyncAPIMock::AsyncAPIMock() {
|
| +AsyncAPIMock::AsyncAPIMock(bool default_do_commands) {
|
| testing::DefaultValue<error::Error>::Set(
|
| error::kNoError);
|
| +
|
| + if (default_do_commands) {
|
| + ON_CALL(*this, DoCommands(_, _, _, _))
|
| + .WillByDefault(Invoke(this, &AsyncAPIMock::FakeDoCommands));
|
| + }
|
| }
|
|
|
| AsyncAPIMock::~AsyncAPIMock() {}
|
|
|
| +error::Error AsyncAPIMock::FakeDoCommands(unsigned int num_commands,
|
| + const void* buffer,
|
| + int num_entries,
|
| + int* entries_processed) {
|
| + return AsyncAPIInterface::DoCommands(
|
| + num_commands, buffer, num_entries, entries_processed);
|
| +}
|
| +
|
| void AsyncAPIMock::SetToken(unsigned int command,
|
| unsigned int arg_count,
|
| const void* _args) {
|
|
|