chromium/gpu/command_buffer/tests/gl_readback_unittest.cc

// Copyright 2014 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/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <GLES2/gl2extchromium.h>
#include <stddef.h>
#include <stdint.h>

#include <cmath>
#include <memory>

#include "base/bit_cast.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "gpu/command_buffer/tests/gl_manager.h"
#include "gpu/command_buffer/tests/gl_test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace gpu {

class GLReadbackTest : public testing::Test {};

TEST_F(GLReadbackTest, ReadPixelsWithPBOAndQuery) {}

static float HalfToFloat32(uint16_t value) {}

static GLuint CompileShader(GLenum type, const char *data) {}

// TODO(zmo): ReadPixels with float type isn't implemented in ANGLE ES2
// backend. crbug.com/607283.
// TODO(zmo): This test also fails on some android devices when the readback
// type is HALF_FLOAT_OES. Likely it's due to a driver bug. crbug.com/607936.
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
#define MAYBE_ReadPixelsFloat
#else
#define MAYBE_ReadPixelsFloat
#endif
TEST_F(GLReadbackTest, MAYBE_ReadPixelsFloat) {}

}  // namespace gpu