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

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

Issue 567005: Moved the initialization of static variable outside the class declaration. Ne... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/common/cmd_buffer_common.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "gpu/command_buffer/common/cmd_buffer_common.h" 8 #include "gpu/command_buffer/common/cmd_buffer_common.h"
9 9
10 namespace gpu { 10 namespace gpu {
11 const int32 CommandHeader::kMaxSize = (1 << 21) - 1;
12
11 namespace cmd { 13 namespace cmd {
12 14
13 const char* GetCommandName(CommandId command_id) { 15 const char* GetCommandName(CommandId command_id) {
14 static const char* const names[] = { 16 static const char* const names[] = {
15 #define COMMON_COMMAND_BUFFER_CMD_OP(name) # name, 17 #define COMMON_COMMAND_BUFFER_CMD_OP(name) # name,
16 18
17 COMMON_COMMAND_BUFFER_CMDS(COMMON_COMMAND_BUFFER_CMD_OP) 19 COMMON_COMMAND_BUFFER_CMDS(COMMON_COMMAND_BUFFER_CMD_OP)
18 20
19 #undef COMMON_COMMAND_BUFFER_CMD_OP 21 #undef COMMON_COMMAND_BUFFER_CMD_OP
20 }; 22 };
21 23
22 int id = static_cast<int>(command_id); 24 int id = static_cast<int>(command_id);
23 return (id >= 0 && id < kNumCommands) ? names[id] : "*unknown-command*"; 25 return (id >= 0 && id < kNumCommands) ? names[id] : "*unknown-command*";
24 } 26 }
25 27
26 } // namespace cmd 28 } // namespace cmd
27 } // namespace gpu 29 } // namespace gpu
28 30
29 31
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/cmd_buffer_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698