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

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

Issue 15938002: Get rid of the relative paths in command_buffer client/common (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 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/mailbox.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 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 #include "../common/mailbox.h" 5 #include "gpu/command_buffer/common/mailbox.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "../common/logging.h" 9 #include "gpu/command_buffer/common/logging.h"
10 10
11 namespace gpu { 11 namespace gpu {
12 12
13 Mailbox::Mailbox() { 13 Mailbox::Mailbox() {
14 memset(name, 0, sizeof(name)); 14 memset(name, 0, sizeof(name));
15 } 15 }
16 16
17 bool Mailbox::IsZero() const { 17 bool Mailbox::IsZero() const {
18 for (size_t i = 0; i < arraysize(name); ++i) { 18 for (size_t i = 0; i < arraysize(name); ++i) {
19 if (name[i]) 19 if (name[i])
20 return false; 20 return false;
21 } 21 }
22 return true; 22 return true;
23 } 23 }
24 24
25 void Mailbox::SetName(const int8* n) { 25 void Mailbox::SetName(const int8* n) {
26 GPU_DCHECK(IsZero() || !memcmp(name, n, sizeof(name))); 26 GPU_DCHECK(IsZero() || !memcmp(name, n, sizeof(name)));
27 memcpy(name, n, sizeof(name)); 27 memcpy(name, n, sizeof(name));
28 } 28 }
29 29
30 } // namespace gpu 30 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/mailbox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698