chromium/ui/gl/test/gl_test_support.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/gl/test/gl_test_support.h"

#include <array>
#include <vector>

#include "base/check_op.h"
#include "base/notreached.h"
#include "build/build_config.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/half_float.h"
#include "ui/gl/init/gl_factory.h"
#include "ui/gl/test/gl_surface_test_support.h"

#if BUILDFLAG(IS_OZONE)
#include "base/run_loop.h"
#include "ui/base/ui_base_features.h"
#include "ui/ozone/public/ozone_platform.h"
#endif

namespace gl {

namespace {

template <typename T>
void rgb_to_yuv(uint8_t r, uint8_t g, uint8_t b, T* y, T* u, T* v) {}

UNSAFE_BUFFER_USAGE base::span<uint8_t> ToSpan_uint8(uint8_t* data,
                                                     size_t start,
                                                     size_t size) {}

UNSAFE_BUFFER_USAGE base::span<uint16_t> ToSpan_uint16(uint8_t* data,
                                                       size_t start,
                                                       size_t size) {}

UNSAFE_BUFFER_USAGE base::span<uint32_t> ToSpan_uint32(uint8_t* data,
                                                       size_t start,
                                                       size_t size) {}

}  // namespace

// static
GLDisplay* GLTestSupport::InitializeGL(
    std::optional<GLImplementationParts> prefered_impl) {}

// static
void GLTestSupport::CleanupGL(GLDisplay* display) {}

// static
void GLTestSupport::SetBufferDataToColor(int width,
                                         int height,
                                         int stride,
                                         int plane,
                                         gfx::BufferFormat format,
                                         base::span<const uint8_t, 4> color,
                                         uint8_t* data) {}
}  // namespace gl