chromium/ui/gfx/buffer_format_util.cc

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

#include "ui/gfx/buffer_format_util.h"

#include "base/check_op.h"
#include "base/notreached.h"
#include "base/numerics/safe_math.h"
#include "base/types/cxx23_to_underlying.h"
#include "ui/gfx/switches.h"

namespace gfx {
namespace {

constexpr auto kBufferFormats =;

static_assert;

}  // namespace

base::span<const BufferFormat> GetBufferFormatsForTesting() {}

size_t AlphaBitsForBufferFormat(BufferFormat format) {}

size_t NumberOfPlanesForLinearBufferFormat(BufferFormat format) {}

bool BufferFormatIsMultiplanar(BufferFormat format) {}

size_t SubsamplingFactorForBufferFormat(BufferFormat format, size_t plane) {}

base::CheckedNumeric<size_t> PlaneWidthForBufferFormatChecked(
    size_t width,
    BufferFormat format,
    size_t plane) {}

base::CheckedNumeric<size_t> PlaneHeightForBufferFormatChecked(
    size_t height,
    BufferFormat format,
    size_t plane) {}

size_t BytesPerPixelForBufferFormat(BufferFormat format, size_t plane) {}

size_t RowByteAlignmentForBufferFormat(BufferFormat format, size_t plane) {}

size_t RowSizeForBufferFormat(size_t width, BufferFormat format, size_t plane) {}

bool RowSizeForBufferFormatChecked(size_t width,
                                   BufferFormat format,
                                   size_t plane,
                                   size_t* size_in_bytes) {}

size_t PlaneSizeForBufferFormat(const Size& size,
                                BufferFormat format,
                                size_t plane) {}

bool PlaneSizeForBufferFormatChecked(const Size& size,
                                     BufferFormat format,
                                     size_t plane,
                                     size_t* size_in_bytes) {}

size_t BufferSizeForBufferFormat(const Size& size, BufferFormat format) {}

bool BufferSizeForBufferFormatChecked(const Size& size,
                                      BufferFormat format,
                                      size_t* size_in_bytes) {}

size_t BufferOffsetForBufferFormat(const Size& size,
                                   BufferFormat format,
                                   size_t plane) {}

const char* BufferFormatToString(BufferFormat format) {}

bool IsOddHeightMultiPlanarBuffersAllowed() {}

bool IsOddWidthMultiPlanarBuffersAllowed() {}

}  // namespace gfx