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

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

Issue 12378053: Move Mailbox from cc to gpu, and its traits to gpu/ipc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "../common/mailbox.h"
no sievers 2013/03/04 18:27:41 here and below: 'gpu/command_buffer/' instead of '
piman 2013/03/04 18:52:05 This is how it's done in gpu/ code, because of (II
6
7 #include <string.h>
8
9 #include "../common/logging.h"
10
11 namespace gpu {
12
13 Mailbox::Mailbox() {
14 memset(name, 0, sizeof(name));
15 }
16
17 bool Mailbox::IsZero() const {
18 for (size_t i = 0; i < arraysize(name); ++i) {
19 if (name[i])
20 return false;
21 }
22 return true;
23 }
24
25 void Mailbox::SetName(const int8* n) {
26 GPU_DCHECK(IsZero() || !memcmp(name, n, sizeof(name)));
27 memcpy(name, n, sizeof(name));
28 }
29
30 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698