chromium/gpu/command_buffer/common/constants.h

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

#ifndef GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_
#define GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_

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

#include "build/build_config.h"

namespace gpu {

CommandBufferOffset;
const CommandBufferOffset kInvalidCommandBufferOffset =;

namespace error {
  enum Error {};

  // Return true if the given error code is an actual error.
  inline bool IsError(Error error) {}

  // Provides finer grained information about why the context was lost.
  enum ContextLostReason {};
}

// Invalid shared memory Id, returned by RegisterSharedMemory in case of
// failure.
const int32_t kInvalidSharedMemoryId =;

// Common Command Buffer shared memory transfer buffer ID.
const int32_t kCommandBufferSharedMemoryId =;

// Namespace used to separate various command buffer types.
enum CommandBufferNamespace : int8_t {};

enum class TransferBufferAllocationOption : int8_t {};

#if BUILDFLAG(IS_WIN)
// Value used for DXGI keyed mutex AcquireSync and ReleaseSync. Exposed here so
// that external clients such as media and video capture can use the same key as
// gpu which is essential for correct operation of the keyed mutex.
constexpr uint64_t kDXGIKeyedMutexAcquireKey = 0;
#endif  // BUILDFLAG(IS_WIN)

}  // namespace gpu

#endif  // GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_