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 // This file contains the binary format definition of the command buffer and | 5 // This file contains the binary format definition of the command buffer and |
6 // command buffer commands. | 6 // command buffer commands. |
7 | 7 |
8 #include "gpu/command_buffer/common/cmd_buffer_common.h" | 8 #include "gpu/command_buffer/common/cmd_buffer_common.h" |
9 | 9 |
| 10 #include <stdint.h> |
| 11 |
10 #include "gpu/command_buffer/common/command_buffer.h" | 12 #include "gpu/command_buffer/common/command_buffer.h" |
11 | 13 |
12 namespace gpu { | 14 namespace gpu { |
13 #if !defined(_WIN32) | 15 #if !defined(_WIN32) |
14 // gcc needs this to link, but MSVC requires it not be present | 16 // gcc needs this to link, but MSVC requires it not be present |
15 const int32 CommandHeader::kMaxSize; | 17 const int32_t CommandHeader::kMaxSize; |
16 #endif | 18 #endif |
17 namespace cmd { | 19 namespace cmd { |
18 | 20 |
19 const char* GetCommandName(CommandId command_id) { | 21 const char* GetCommandName(CommandId command_id) { |
20 static const char* const names[] = { | 22 static const char* const names[] = { |
21 #define COMMON_COMMAND_BUFFER_CMD_OP(name) # name, | 23 #define COMMON_COMMAND_BUFFER_CMD_OP(name) # name, |
22 | 24 |
23 COMMON_COMMAND_BUFFER_CMDS(COMMON_COMMAND_BUFFER_CMD_OP) | 25 COMMON_COMMAND_BUFFER_CMDS(COMMON_COMMAND_BUFFER_CMD_OP) |
24 | 26 |
25 #undef COMMON_COMMAND_BUFFER_CMD_OP | 27 #undef COMMON_COMMAND_BUFFER_CMD_OP |
(...skipping 11 matching lines...) Expand all Loading... |
37 // ints redundantly when only the error is needed for the CommandBufferProxy | 39 // ints redundantly when only the error is needed for the CommandBufferProxy |
38 // implementation. | 40 // implementation. |
39 error::Error CommandBuffer::GetLastError() { | 41 error::Error CommandBuffer::GetLastError() { |
40 return GetLastState().error; | 42 return GetLastState().error; |
41 } | 43 } |
42 #endif | 44 #endif |
43 | 45 |
44 } // namespace gpu | 46 } // namespace gpu |
45 | 47 |
46 | 48 |
OLD | NEW |