| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gpu/command_buffer/service/mocks.h" | 5 #include "gpu/command_buffer/service/mocks.h" |
| 6 | 6 |
| 7 namespace gpu { | 7 namespace gpu { |
| 8 | 8 |
| 9 AsyncAPIMock::AsyncAPIMock() { | 9 AsyncAPIMock::AsyncAPIMock() { |
| 10 testing::DefaultValue<error::Error>::Set( | 10 testing::DefaultValue<error::Error>::Set( |
| 11 error::kNoError); | 11 error::kNoError); |
| 12 } | 12 } |
| 13 | 13 |
| 14 AsyncAPIMock::~AsyncAPIMock() {} | 14 AsyncAPIMock::~AsyncAPIMock() {} |
| 15 | 15 |
| 16 void AsyncAPIMock::SetToken(unsigned int command, | 16 void AsyncAPIMock::SetToken(unsigned int command, |
| 17 unsigned int arg_count, | 17 unsigned int arg_count, |
| 18 const void* _args) { | 18 const void* _args) { |
| 19 DCHECK(engine_); | 19 DCHECK(engine_); |
| 20 DCHECK_EQ(1u, command); | 20 DCHECK_EQ(1u, command); |
| 21 DCHECK_EQ(1u, arg_count); | 21 DCHECK_EQ(1u, arg_count); |
| 22 const CommandBufferEntry* args = | 22 const cmd::SetToken* args = |
| 23 static_cast<const CommandBufferEntry*>(_args); | 23 static_cast<const cmd::SetToken*>(_args); |
| 24 engine_->set_token(args[0].value_uint32); | 24 engine_->set_token(args->token); |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace gles2 { | 27 namespace gles2 { |
| 28 | 28 |
| 29 MockShaderTranslator::MockShaderTranslator() {} | 29 MockShaderTranslator::MockShaderTranslator() {} |
| 30 | 30 |
| 31 MockShaderTranslator::~MockShaderTranslator() {} | 31 MockShaderTranslator::~MockShaderTranslator() {} |
| 32 | 32 |
| 33 } // namespace gles2 | 33 } // namespace gles2 |
| 34 } // namespace gpu | 34 } // namespace gpu |
| OLD | NEW |