#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <algorithm>
#include <tuple>
#include "base/functional/bind.h"
#include "base/json/json_reader.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/trace_event/trace_event.h"
#include "build/build_config.h"
#include "components/viz/test/test_gpu_service_holder.h"
#include "gpu/command_buffer/client/gl_helper.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
#include "gpu/command_buffer/client/shared_memory_limits.h"
#include "gpu/ipc/common/surface_handle.h"
#include "gpu/ipc/gl_in_process_context.h"
#include "media/base/video_frame.h"
#include "media/base/video_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#if !BUILDFLAG(IS_ANDROID)
namespace viz {
namespace {
int kYUVReadbackSizes[] = …;
}
class YUVReadbackTest : public testing::Test { … };
TEST_F(YUVReadbackTest, YUVReadbackOptTest) { … }
class YUVReadbackPixelTest
: public YUVReadbackTest,
public ::testing::WithParamInterface<
std::tuple<bool, bool, unsigned int, unsigned int>> { … };
TEST_P(YUVReadbackPixelTest, Test) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
#endif