#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/viz/test/test_gles2_interface.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/memory/scoped_refptr.h"
#include "components/viz/test/test_context_support.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/command_buffer/common/mailbox.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace viz {
static unsigned NextContextId() { … }
TestGLES2Interface::TestGLES2Interface() : … { … }
TestGLES2Interface::~TestGLES2Interface() = default;
void TestGLES2Interface::GenTextures(GLsizei n, GLuint* textures) { … }
void TestGLES2Interface::GenBuffers(GLsizei n, GLuint* buffers) { … }
void TestGLES2Interface::GenFramebuffers(GLsizei n, GLuint* framebuffers) { … }
void TestGLES2Interface::GenRenderbuffers(GLsizei n, GLuint* renderbuffers) { … }
void TestGLES2Interface::GenQueriesEXT(GLsizei n, GLuint* queries) { … }
void TestGLES2Interface::DeleteTextures(GLsizei n, const GLuint* textures) { … }
void TestGLES2Interface::DeleteBuffers(GLsizei n, const GLuint* buffers) { … }
void TestGLES2Interface::DeleteFramebuffers(GLsizei n,
const GLuint* framebuffers) { … }
void TestGLES2Interface::DeleteQueriesEXT(GLsizei n, const GLuint* queries) { … }
GLuint TestGLES2Interface::CreateShader(GLenum type) { … }
GLuint TestGLES2Interface::CreateProgram() { … }
void TestGLES2Interface::BindTexture(GLenum target, GLuint texture) { … }
void TestGLES2Interface::GetIntegerv(GLenum pname, GLint* params) { … }
void TestGLES2Interface::GetShaderiv(GLuint shader,
GLenum pname,
GLint* params) { … }
void TestGLES2Interface::GetProgramiv(GLuint program,
GLenum pname,
GLint* params) { … }
void TestGLES2Interface::GetShaderPrecisionFormat(GLenum shadertype,
GLenum precisiontype,
GLint* range,
GLint* precision) { … }
void TestGLES2Interface::UseProgram(GLuint program) { … }
GLenum TestGLES2Interface::CheckFramebufferStatus(GLenum target) { … }
void TestGLES2Interface::Flush() { … }
void TestGLES2Interface::Finish() { … }
void TestGLES2Interface::ShallowFinishCHROMIUM() { … }
void TestGLES2Interface::BindRenderbuffer(GLenum target, GLuint renderbuffer) { … }
void TestGLES2Interface::BindFramebuffer(GLenum target, GLuint framebuffer) { … }
void TestGLES2Interface::BindBuffer(GLenum target, GLuint buffer) { … }
void TestGLES2Interface::PixelStorei(GLenum pname, GLint param) { … }
void* TestGLES2Interface::MapBufferCHROMIUM(GLuint target, GLenum access) { … }
GLboolean TestGLES2Interface::UnmapBufferCHROMIUM(GLuint target) { … }
void TestGLES2Interface::BufferData(GLenum target,
GLsizeiptr size,
const void* data,
GLenum usage) { … }
void TestGLES2Interface::GenSyncTokenCHROMIUM(GLbyte* sync_token) { … }
void TestGLES2Interface::GenUnverifiedSyncTokenCHROMIUM(GLbyte* sync_token) { … }
void TestGLES2Interface::VerifySyncTokensCHROMIUM(GLbyte** sync_tokens,
GLsizei count) { … }
void TestGLES2Interface::WaitSyncTokenCHROMIUM(const GLbyte* sync_token) { … }
void TestGLES2Interface::BeginQueryEXT(GLenum target, GLuint id) { … }
void TestGLES2Interface::EndQueryEXT(GLenum target) { … }
void TestGLES2Interface::GetQueryObjectuivEXT(GLuint id,
GLenum pname,
GLuint* params) { … }
GLuint TestGLES2Interface::CreateAndTexStorage2DSharedImageCHROMIUM(
const GLbyte* mailbox) { … }
void TestGLES2Interface::ResizeCHROMIUM(GLuint width,
GLuint height,
float device_scale,
GLcolorSpace color_space,
GLboolean has_alpha) { … }
void TestGLES2Interface::LoseContextCHROMIUM(GLenum current, GLenum other) { … }
GLenum TestGLES2Interface::GetGraphicsResetStatusKHR() { … }
void TestGLES2Interface::ReadPixels(GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
void* pixels) { … }
void TestGLES2Interface::set_support_texture_half_float_linear(bool support) { … }
void TestGLES2Interface::set_support_texture_norm16(bool support) { … }
void TestGLES2Interface::set_gpu_rasterization(bool gpu_rasterization) { … }
void TestGLES2Interface::set_max_texture_size(int size) { … }
void TestGLES2Interface::set_supports_gpu_memory_buffer_format(
gfx::BufferFormat format,
bool support) { … }
void TestGLES2Interface::set_supports_texture_rg(bool support) { … }
size_t TestGLES2Interface::NumTextures() const { … }
GLuint TestGLES2Interface::NextTextureId() { … }
void TestGLES2Interface::RetireTextureId(GLuint id) { … }
GLuint TestGLES2Interface::NextBufferId() { … }
void TestGLES2Interface::RetireBufferId(GLuint id) { … }
GLuint TestGLES2Interface::NextImageId() { … }
void TestGLES2Interface::RetireImageId(GLuint id) { … }
GLuint TestGLES2Interface::NextFramebufferId() { … }
void TestGLES2Interface::RetireFramebufferId(GLuint id) { … }
GLuint TestGLES2Interface::NextRenderbufferId() { … }
void TestGLES2Interface::RetireRenderbufferId(GLuint id) { … }
size_t TestGLES2Interface::NumFramebuffers() const { … }
size_t TestGLES2Interface::NumRenderbuffers() const { … }
TestGLES2Interface::Buffer::Buffer() : … { … }
TestGLES2Interface::Buffer::~Buffer() = default;
}