#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "gpu/command_buffer/client/gl_helper.h"
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <GLES2/gl2extchromium.h>
#include <algorithm>
#include <cmath>
#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted_memory.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "components/viz/test/test_gpu_service_holder.h"
#include "gpu/command_buffer/client/gl_helper_scaling.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
#include "gpu/command_buffer/client/shared_memory_limits.h"
#include "gpu/ipc/gl_in_process_context.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#if !BUILDFLAG(IS_ANDROID)
namespace gpu {
namespace {
GLHelper::ScalerQuality kQualities[] = …;
const char* kQualityNames[] = …;
}
class GLHelperTest : public testing::Test { … };
class GLHelperPixelTest : public GLHelperTest { … };
TEST_F(GLHelperTest, DISABLED_RGBAASyncReadbackTest) { … }
TEST_F(GLHelperTest, BGRAASyncReadbackTest) { … }
int kRGBReadBackSizes[] = …;
class GLHelperPixelReadbackTest
: public GLHelperPixelTest,
public ::testing::WithParamInterface<std::tuple<unsigned int,
unsigned int,
unsigned int,
unsigned int,
unsigned int>> { … };
#if BUILDFLAG(IS_LINUX) && defined(ADDRESS_SANITIZER)
#define MAYBE_ScaleTest …
#else
#define MAYBE_ScaleTest …
#endif
TEST_P(GLHelperPixelReadbackTest, MAYBE_ScaleTest) { … }
TEST_P(GLHelperPixelReadbackTest, DISABLED_ScalePatching) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(GLHelperTest, ValidateScalerPipelines) { … }
TEST_F(GLHelperTest, CheckSpecificPipelines) { … }
TEST_F(GLHelperTest, ScalerOpTest) { … }
TEST_F(GLHelperTest, CheckOptimizations) { … }
}
#endif