#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <GLES2/gl2.h>
#include <GLES2/gl2chromium.h>
#include <GLES2/gl2ext.h>
#include <GLES2/gl2extchromium.h>
#include <stdint.h>
#include <memory>
#include "base/functional/bind.h"
#include "base/memory/ref_counted.h"
#include "base/process/process_handle.h"
#include "build/build_config.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
#include "gpu/command_buffer/service/command_buffer_service.h"
#include "gpu/command_buffer/tests/gl_manager.h"
#include "gpu/command_buffer/tests/gl_test_utils.h"
#include "gpu/config/gpu_test_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/libyuv/include/libyuv.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/half_float.h"
#include "ui/gl/test/gl_test_support.h"
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h"
#include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h"
#endif
#define SKIP_TEST_IF(cmd) …
_;
IgnoreResult;
InvokeWithoutArgs;
Invoke;
Return;
SetArgPointee;
StrictMock;
namespace gpu {
namespace gles2 {
static const int kImageWidth = …;
static const int kImageHeight = …;
class GpuMemoryBufferTest : public testing::TestWithParam<gfx::BufferFormat> { … };
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
class GpuMemoryBufferTestEGL : public testing::Test,
public gpu::GpuCommandBufferTestEGL { … };
#endif
namespace {
#define SHADER(Src) …
uint32_t BufferFormatToFourCC(gfx::BufferFormat format) { … }
}
TEST_P(GpuMemoryBufferTest, MapUnmap) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}