| 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> | 10 #include <stdint.h> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 COMMON_COMMAND_BUFFER_CMDS(COMMON_COMMAND_BUFFER_CMD_OP) | 25 COMMON_COMMAND_BUFFER_CMDS(COMMON_COMMAND_BUFFER_CMD_OP) |
| 26 | 26 |
| 27 #undef COMMON_COMMAND_BUFFER_CMD_OP | 27 #undef COMMON_COMMAND_BUFFER_CMD_OP |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 int id = static_cast<int>(command_id); | 30 int id = static_cast<int>(command_id); |
| 31 return (id >= 0 && id < kNumCommands) ? names[id] : "*unknown-command*"; | 31 return (id >= 0 && id < kNumCommands) ? names[id] : "*unknown-command*"; |
| 32 } | 32 } |
| 33 | 33 |
| 34 } // namespace cmd | 34 } // namespace cmd |
| 35 | |
| 36 #if !defined(NACL_WIN64) | |
| 37 // TODO(apatrick): this is a temporary optimization while skia is calling | |
| 38 // RendererGLContext::MakeCurrent prior to every GL call. It saves returning 6 | |
| 39 // ints redundantly when only the error is needed for the CommandBufferProxy | |
| 40 // implementation. | |
| 41 error::Error CommandBuffer::GetLastError() { | |
| 42 return GetLastState().error; | |
| 43 } | |
| 44 #endif | |
| 45 | |
| 46 } // namespace gpu | 35 } // namespace gpu |
| 47 | 36 |
| 48 | 37 |
| OLD | NEW |