chromium/gpu/command_buffer/common/mailbox.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "gpu/command_buffer/common/mailbox.h"

#include <stddef.h>
#include <stdint.h>
#include <string.h>

#include "base/check.h"
#include "base/rand_util.h"
#include "base/strings/stringprintf.h"

namespace gpu {
namespace {

// The last byte of the mailbox's name stores a bit that ensures that the
// mailbox doesn't end up being generated as zero. This avoids conflicts with
// Verify logic, which uses the first byte.
constexpr size_t kLiveMailboxIndex =;

// Use the lowest bit for the flag marking the mailbox as live (any bit would
// work).
constexpr int8_t kLiveMailboxFlag =;

}  // namespace

Mailbox::Mailbox() {}

bool Mailbox::IsZero() const {}

void Mailbox::SetZero() {}

void Mailbox::SetName(const int8_t* n) {}

Mailbox Mailbox::Generate() {}

bool Mailbox::Verify() const {}

std::string Mailbox::ToDebugString() const {}

bool Mailbox::operator==(const Mailbox& other) const {}

std::strong_ordering Mailbox::operator<=>(const Mailbox& other) const {}

}  // namespace gpu