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.
5 #include "gpu/command_buffer/common/mailbox.h"
9 #include "gpu/command_buffer/common/logging.h"
14 memset(name
, 0, sizeof(name
));
17 bool Mailbox::IsZero() const {
18 for (size_t i
= 0; i
< arraysize(name
); ++i
) {
25 void Mailbox::SetZero() {
26 memset(name
, 0, sizeof(name
));
29 void Mailbox::SetName(const int8
* n
) {
30 GPU_DCHECK(IsZero() || !memcmp(name
, n
, sizeof(name
)));
31 memcpy(name
, n
, sizeof(name
));