Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_format.cc

Issue 1542513002: Switch to standard integer types in gpu/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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 // We explicitly do NOT include gles2_cmd_format.h here because client side 8 // We explicitly do NOT include gles2_cmd_format.h here because client side
9 // and service side have different requirements. 9 // and service side have different requirements.
10 #include "gpu/command_buffer/common/cmd_buffer_common.h" 10 #include "gpu/command_buffer/common/cmd_buffer_common.h"
11 11
12 namespace gpu { 12 namespace gpu {
13 namespace gles2 { 13 namespace gles2 {
14 14
15 #include <stddef.h>
16
15 #include "gpu/command_buffer/common/gles2_cmd_ids_autogen.h" 17 #include "gpu/command_buffer/common/gles2_cmd_ids_autogen.h"
16 18
17 const char* GetCommandName(CommandId id) { 19 const char* GetCommandName(CommandId id) {
18 static const char* const names[] = { 20 static const char* const names[] = {
19 #define GLES2_CMD_OP(name) "k" # name, 21 #define GLES2_CMD_OP(name) "k" # name,
20 22
21 GLES2_COMMAND_LIST(GLES2_CMD_OP) 23 GLES2_COMMAND_LIST(GLES2_CMD_OP)
22 24
23 #undef GLES2_CMD_OP 25 #undef GLES2_CMD_OP
24 }; 26 };
25 27
26 size_t index = static_cast<size_t>(id) - kStartPoint - 1; 28 size_t index = static_cast<size_t>(id) - kStartPoint - 1;
27 return (index < arraysize(names)) ? names[index] : "*unknown-command*"; 29 return (index < arraysize(names)) ? names[index] : "*unknown-command*";
28 } 30 }
29 31
30 } // namespace gles2 32 } // namespace gles2
31 } // namespace gpu 33 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_format.h ('k') | gpu/command_buffer/common/gles2_cmd_format_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698