Elim cr-checkbox
[chromium-blink-merge.git] / gpu / command_buffer / common / gles2_cmd_format.cc
blob5b437a5b2f1b8db26ecd36045ed408aa14487343
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file contains the binary format definition of the command buffer and
6 // command buffer commands.
8 // We explicitly do NOT include gles2_cmd_format.h here because client side
9 // and service side have different requirements.
10 #include "gpu/command_buffer/common/cmd_buffer_common.h"
12 namespace gpu {
13 namespace gles2 {
15 #include "gpu/command_buffer/common/gles2_cmd_ids_autogen.h"
17 const char* GetCommandName(CommandId id) {
18 static const char* const names[] = {
19 #define GLES2_CMD_OP(name) "k" # name,
21 GLES2_COMMAND_LIST(GLES2_CMD_OP)
23 #undef GLES2_CMD_OP
26 size_t index = static_cast<size_t>(id) - kStartPoint - 1;
27 return (index < arraysize(names)) ? names[index] : "*unknown-command*";
30 } // namespace gles2
31 } // namespace gpu