| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common_decoder.h" | 5 #include "gpu/command_buffer/service/common_decoder.h" |
| 6 | 6 |
| 7 #include <algorithm> |
| 8 |
| 7 #include "base/numerics/safe_math.h" | 9 #include "base/numerics/safe_math.h" |
| 8 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 10 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
| 9 | 11 |
| 10 namespace gpu { | 12 namespace gpu { |
| 11 | 13 |
| 12 const CommonDecoder::CommandInfo CommonDecoder::command_info[] = { | 14 const CommonDecoder::CommandInfo CommonDecoder::command_info[] = { |
| 13 #define COMMON_COMMAND_BUFFER_CMD_OP(name) \ | 15 #define COMMON_COMMAND_BUFFER_CMD_OP(name) \ |
| 14 { \ | 16 { \ |
| 15 &CommonDecoder::Handle##name, cmd::name::kArgFlags, \ | 17 &CommonDecoder::Handle##name, cmd::name::kArgFlags, \ |
| 16 cmd::name::cmd_flags, \ | 18 cmd::name::cmd_flags, \ |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 } | 328 } |
| 327 const void* src = bucket->GetData(offset, size); | 329 const void* src = bucket->GetData(offset, size); |
| 328 if (!src) { | 330 if (!src) { |
| 329 return error::kInvalidArguments; | 331 return error::kInvalidArguments; |
| 330 } | 332 } |
| 331 memcpy(data, src, size); | 333 memcpy(data, src, size); |
| 332 return error::kNoError; | 334 return error::kNoError; |
| 333 } | 335 } |
| 334 | 336 |
| 335 } // namespace gpu | 337 } // namespace gpu |
| OLD | NEW |