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

Side by Side Diff: gpu/command_buffer/common/mailbox.h

Issue 138763009: Fix (or tag) uses of explicit '64' instead of GL_MAILBOX_SIZE_CHROMIUM (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef GPU_COMMAND_BUFFER_MAILBOX_H_ 5 #ifndef GPU_COMMAND_BUFFER_MAILBOX_H_
6 #define GPU_COMMAND_BUFFER_MAILBOX_H_ 6 #define GPU_COMMAND_BUFFER_MAILBOX_H_
7 7
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "gpu/command_buffer/common/types.h" 10 #include "gpu/command_buffer/common/types.h"
11 #include "gpu/gpu_export.h" 11 #include "gpu/gpu_export.h"
12 12
13 // From gl2/gl2ext.h.
14 #ifndef GL_MAILBOX_SIZE_CHROMIUM
15 #define GL_MAILBOX_SIZE_CHROMIUM 64
16 #endif
17
13 namespace gpu { 18 namespace gpu {
14 19
15 struct GPU_EXPORT Mailbox { 20 struct GPU_EXPORT Mailbox {
16 Mailbox(); 21 Mailbox();
17 bool IsZero() const; 22 bool IsZero() const;
18 void SetZero(); 23 void SetZero();
19 void SetName(const int8* name); 24 void SetName(const int8* name);
20 int8 name[64]; 25 int8 name[GL_MAILBOX_SIZE_CHROMIUM];
21 bool operator<(const Mailbox& other) const { 26 bool operator<(const Mailbox& other) const {
22 return memcmp(this, &other, sizeof other) < 0; 27 return memcmp(this, &other, sizeof other) < 0;
23 } 28 }
24 bool operator==(const Mailbox& other) const { 29 bool operator==(const Mailbox& other) const {
25 return memcmp(this, &other, sizeof other) == 0; 30 return memcmp(this, &other, sizeof other) == 0;
26 } 31 }
27 bool operator!=(const Mailbox& other) const { 32 bool operator!=(const Mailbox& other) const {
28 return !operator==(other); 33 return !operator==(other);
29 } 34 }
30 }; 35 };
31 36
32 } // namespace gpu 37 } // namespace gpu
33 38
34 #endif // GPU_COMMAND_BUFFER_MAILBOX_H_ 39 #endif // GPU_COMMAND_BUFFER_MAILBOX_H_
35 40
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698