#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <memory>
#include <string>
#include <vector>
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/containers/heap_array.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "build/build_config.h"
#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/command_buffer/service/context_group.h"
#include "gpu/command_buffer/service/context_state_test_helpers.h"
#include "gpu/command_buffer/service/copy_texture_chromium_mock.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "gpu/command_buffer/service/logger.h"
#include "gpu/command_buffer/service/program_manager.h"
#include "gpu/command_buffer/service/service_utils.h"
#include "gpu/command_buffer/service/test_helper.h"
#include "gpu/command_buffer/service/vertex_attrib_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_mock.h"
#include "ui/gl/init/gl_factory.h"
#include "ui/gl/test/gl_surface_test_support.h"
#if BUILDFLAG(IS_OZONE)
#include "ui/ozone/public/ozone_platform.h"
#endif
MockGLInterface;
_;
AnyNumber;
AtMost;
DoAll;
InSequence;
Invoke;
InvokeWithoutArgs;
MatcherCast;
Pointee;
Return;
SetArrayArgument;
SetArgPointee;
StrEq;
StrictMock;
WithArg;
namespace {
void NormalizeInitState(gpu::gles2::GLES2DecoderTestBase::InitState* init) { … }
const uint32_t kMaxColorAttachments = …;
const uint32_t kMaxDrawBuffers = …;
}
namespace gpu {
namespace gles2 {
GLES2DecoderTestBase::GLES2DecoderTestBase()
: … { … }
GLES2DecoderTestBase::~GLES2DecoderTestBase() = default;
void GLES2DecoderTestBase::OnConsoleMessage(int32_t id,
const std::string& message) { … }
void GLES2DecoderTestBase::CacheBlob(gpu::GpuDiskCacheType type,
const std::string& key,
const std::string& blob) { … }
void GLES2DecoderTestBase::OnFenceSyncRelease(uint64_t release) { … }
void GLES2DecoderTestBase::OnDescheduleUntilFinished() { … }
void GLES2DecoderTestBase::OnRescheduleAfterFinished() { … }
void GLES2DecoderTestBase::OnSwapBuffers(uint64_t swap_id, uint32_t flags) { … }
bool GLES2DecoderTestBase::ShouldYield() { … }
void GLES2DecoderTestBase::SetUp() { … }
GLES2DecoderTestBase::InitState::InitState() = default;
GLES2DecoderTestBase::InitState::InitState(const InitState& other) = default;
GLES2DecoderTestBase::InitState& GLES2DecoderTestBase::InitState::operator=(
const InitState& other) = default;
void GLES2DecoderTestBase::InitDecoder(const InitState& init) { … }
void GLES2DecoderTestBase::InitDecoderWithWorkarounds(
const InitState& init,
const gpu::GpuDriverBugWorkarounds& workarounds) { … }
ContextResult GLES2DecoderTestBase::MaybeInitDecoderWithWorkarounds(
const InitState& init,
const gpu::GpuDriverBugWorkarounds& workarounds) { … }
void GLES2DecoderTestBase::ResetDecoder() { … }
void GLES2DecoderTestBase::TearDown() { … }
GLint GLES2DecoderTestBase::GetGLError() { … }
void GLES2DecoderTestBase::DoCreateShader(
GLenum shader_type, GLuint client_id, GLuint service_id) { … }
bool GLES2DecoderTestBase::DoIsShader(GLuint client_id) { … }
void GLES2DecoderTestBase::DoDeleteShader(
GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::DoCreateProgram(
GLuint client_id, GLuint service_id) { … }
bool GLES2DecoderTestBase::DoIsProgram(GLuint client_id) { … }
void GLES2DecoderTestBase::DoDeleteProgram(
GLuint client_id, GLuint ) { … }
void GLES2DecoderTestBase::DoFenceSync(
GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::DoCreateSampler(
GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::DoBindSampler(
GLuint unit, GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::DoDeleteSampler(
GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::DoCreateTransformFeedback(
GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::DoBindTransformFeedback(
GLenum target, GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::DoDeleteTransformFeedback(
GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::SetBucketData(
uint32_t bucket_id, const void* data, uint32_t data_size) { … }
void GLES2DecoderTestBase::SetBucketAsCString(uint32_t bucket_id,
const char* str) { … }
void GLES2DecoderTestBase::SetBucketAsCStrings(uint32_t bucket_id,
GLsizei count,
const char** str,
GLsizei count_in_header,
char str_end) { … }
void GLES2DecoderTestBase::SetupClearTextureExpectations(
GLuint service_id,
GLuint old_service_id,
GLenum bind_target,
GLenum target,
GLint level,
GLenum format,
GLenum type,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLuint bound_pixel_unpack_buffer) { … }
void GLES2DecoderTestBase::SetupClearTexture3DExpectations(
GLsizeiptr buffer_size,
GLenum target,
GLuint tex_service_id,
GLint level,
GLenum format,
GLenum type,
size_t tex_sub_image_3d_num_calls,
GLint* xoffset,
GLint* yoffset,
GLint* zoffset,
GLsizei* width,
GLsizei* height,
GLsizei* depth,
GLuint bound_pixel_unpack_buffer) { … }
void GLES2DecoderTestBase::SetupExpectationsForFramebufferClearing(
GLenum target,
GLuint clear_bits,
GLclampf restore_red,
GLclampf restore_green,
GLclampf restore_blue,
GLclampf restore_alpha,
GLuint restore_stencil,
GLclampf restore_depth,
bool restore_scissor_test,
GLint restore_scissor_x,
GLint restore_scissor_y,
GLsizei restore_scissor_width,
GLsizei restore_scissor_height) { … }
void GLES2DecoderTestBase::SetupExpectationsForRestoreClearState(
GLclampf restore_red,
GLclampf restore_green,
GLclampf restore_blue,
GLclampf restore_alpha,
GLuint restore_stencil,
GLclampf restore_depth,
bool restore_scissor_test,
GLint restore_scissor_x,
GLint restore_scissor_y,
GLsizei restore_scissor_width,
GLsizei restore_scissor_height) { … }
void GLES2DecoderTestBase::SetupExpectationsForFramebufferClearingMulti(
GLuint read_framebuffer_service_id,
GLuint draw_framebuffer_service_id,
GLenum target,
GLuint clear_bits,
GLclampf restore_red,
GLclampf restore_green,
GLclampf restore_blue,
GLclampf restore_alpha,
GLuint restore_stencil,
GLclampf restore_depth,
bool restore_scissor_test,
GLint restore_scissor_x,
GLint restore_scissor_y,
GLsizei restore_scissor_width,
GLsizei restore_scissor_height) { … }
void GLES2DecoderTestBase::SetupShaderForUniform(GLenum uniform_type) { … }
void GLES2DecoderTestBase::DoBindBuffer(
GLenum target, GLuint client_id, GLuint service_id) { … }
bool GLES2DecoderTestBase::DoIsBuffer(GLuint client_id) { … }
void GLES2DecoderTestBase::DoDeleteBuffer(
GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::SetupExpectationsForColorMask(bool red,
bool green,
bool blue,
bool alpha) { … }
void GLES2DecoderTestBase::SetupExpectationsForDepthMask(bool mask) { … }
void GLES2DecoderTestBase::SetupExpectationsForStencilMask(GLuint front_mask,
GLuint back_mask) { … }
void GLES2DecoderTestBase::SetupExpectationsForEnableDisable(GLenum cap,
bool enable) { … }
void GLES2DecoderTestBase::SetupExpectationsForApplyingDirtyState(
bool framebuffer_is_rgb,
bool framebuffer_has_depth,
bool framebuffer_has_stencil,
GLuint color_bits,
bool depth_mask,
bool depth_enabled,
GLuint front_stencil_mask,
GLuint back_stencil_mask,
bool stencil_enabled) { … }
void GLES2DecoderTestBase::SetupExpectationsForApplyingDefaultDirtyState() { … }
GLES2DecoderTestBase::EnableFlags::EnableFlags()
: … { … }
void GLES2DecoderTestBase::DoBindFramebuffer(
GLenum target, GLuint client_id, GLuint service_id) { … }
bool GLES2DecoderTestBase::DoIsFramebuffer(GLuint client_id) { … }
void GLES2DecoderTestBase::DoDeleteFramebuffer(
GLuint client_id, GLuint service_id,
bool reset_draw, GLenum draw_target, GLuint draw_id,
bool reset_read, GLenum read_target, GLuint read_id) { … }
void GLES2DecoderTestBase::DoBindRenderbuffer(
GLenum target, GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::SetupExpectationsForInternalFormatSampleCountsHelper(
GLenum target,
GLenum internal_format,
GLint expected_num_sample_counts,
GLint expected_sample0) { … }
void GLES2DecoderTestBase::DoRenderbufferStorageMultisampleCHROMIUM(
GLenum target,
GLsizei samples,
GLenum internal_format,
GLsizei width,
GLsizei height,
bool expect_bind) { … }
void GLES2DecoderTestBase::RestoreRenderbufferBindings() { … }
void GLES2DecoderTestBase::EnsureRenderbufferBound(bool expect_bind) { … }
bool GLES2DecoderTestBase::DoIsRenderbuffer(GLuint client_id) { … }
void GLES2DecoderTestBase::DoDeleteRenderbuffer(
GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::DoBindTexture(
GLenum target, GLuint client_id, GLuint service_id) { … }
bool GLES2DecoderTestBase::DoIsTexture(GLuint client_id) { … }
void GLES2DecoderTestBase::DoDeleteTexture(
GLuint client_id, GLuint service_id) { … }
void GLES2DecoderTestBase::DoTexImage2D(GLenum target,
GLint level,
GLenum internal_format,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
uint32_t shared_memory_id,
uint32_t shared_memory_offset) { … }
void GLES2DecoderTestBase::DoTexImage2DConvertInternalFormat(
GLenum target,
GLint level,
GLenum requested_internal_format,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
uint32_t shared_memory_id,
uint32_t shared_memory_offset,
GLenum expected_internal_format) { … }
void GLES2DecoderTestBase::DoCompressedTexImage2D(GLenum target,
GLint level,
GLenum format,
GLsizei width,
GLsizei height,
GLint border,
GLsizei size,
uint32_t bucket_id) { … }
void GLES2DecoderTestBase::DoTexImage3D(GLenum target,
GLint level,
GLenum internal_format,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
uint32_t shared_memory_id,
uint32_t shared_memory_offset) { … }
void GLES2DecoderTestBase::DoCopyTexImage2D(
GLenum target,
GLint level,
GLenum internal_format,
GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLint border) { … }
void GLES2DecoderTestBase::DoRenderbufferStorage(GLenum target,
GLenum internal_format,
GLsizei width,
GLsizei height,
GLenum error) { … }
void GLES2DecoderTestBase::DoFramebufferTexture2D(
GLenum target, GLenum attachment, GLenum textarget,
GLuint texture_client_id, GLuint texture_service_id, GLint level,
GLenum error) { … }
void GLES2DecoderTestBase::DoFramebufferRenderbuffer(
GLenum target,
GLenum attachment,
GLenum renderbuffer_target,
GLuint renderbuffer_client_id,
GLuint renderbuffer_service_id,
GLenum error) { … }
GLenum GLES2DecoderTestBase::DoCheckFramebufferStatus(GLenum target) { … }
void GLES2DecoderTestBase::DoVertexAttribPointer(
GLuint index, GLint size, GLenum type, GLsizei stride, GLuint offset) { … }
void GLES2DecoderTestBase::DoVertexAttribDivisorANGLE(
GLuint index, GLuint divisor) { … }
void GLES2DecoderTestBase::AddExpectationsForGenVertexArraysOES() { … }
void GLES2DecoderTestBase::AddExpectationsForDeleteVertexArraysOES() { … }
void GLES2DecoderTestBase::AddExpectationsForDeleteBoundVertexArraysOES() { … }
void GLES2DecoderTestBase::AddExpectationsForBindVertexArrayOES() { … }
void GLES2DecoderTestBase::AddExpectationsForRestoreAttribState(GLuint attrib) { … }
#ifndef COMPILER_MSVC
const int GLES2DecoderTestBase::kBackBufferWidth;
const int GLES2DecoderTestBase::kBackBufferHeight;
const GLint GLES2DecoderTestBase::kMaxTextureSize;
const GLint GLES2DecoderTestBase::kMaxCubeMapTextureSize;
const GLint GLES2DecoderTestBase::kNumVertexAttribs;
const GLint GLES2DecoderTestBase::kNumTextureUnits;
const GLint GLES2DecoderTestBase::kMaxTextureImageUnits;
const GLint GLES2DecoderTestBase::kMaxVertexTextureImageUnits;
const GLint GLES2DecoderTestBase::kMaxFragmentUniformVectors;
const GLint GLES2DecoderTestBase::kMaxVaryingVectors;
const GLint GLES2DecoderTestBase::kMaxVertexUniformVectors;
const GLint GLES2DecoderTestBase::kMaxViewportWidth;
const GLint GLES2DecoderTestBase::kMaxViewportHeight;
const GLuint GLES2DecoderTestBase::kServiceAttrib0BufferId;
const GLuint GLES2DecoderTestBase::kServiceFixedAttribBufferId;
const GLuint GLES2DecoderTestBase::kServiceBufferId;
const GLuint GLES2DecoderTestBase::kServiceFramebufferId;
const GLuint GLES2DecoderTestBase::kServiceRenderbufferId;
const GLuint GLES2DecoderTestBase::kServiceSamplerId;
const GLuint GLES2DecoderTestBase::kServiceTextureId;
const GLuint GLES2DecoderTestBase::kServiceProgramId;
const GLuint GLES2DecoderTestBase::kServiceShaderId;
const GLuint GLES2DecoderTestBase::kServiceElementBufferId;
const GLuint GLES2DecoderTestBase::kServiceQueryId;
const GLuint GLES2DecoderTestBase::kServiceVertexArrayId;
const GLuint GLES2DecoderTestBase::kServiceTransformFeedbackId;
const GLuint GLES2DecoderTestBase::kServiceDefaultTransformFeedbackId;
const GLuint GLES2DecoderTestBase::kServiceSyncId;
const size_t GLES2DecoderTestBase::kSharedBufferSize;
const uint32_t GLES2DecoderTestBase::kSharedMemoryOffset;
const int32_t GLES2DecoderTestBase::kInvalidSharedMemoryId;
const uint32_t GLES2DecoderTestBase::kInvalidSharedMemoryOffset;
const uint32_t GLES2DecoderTestBase::kInitialResult;
const uint8_t GLES2DecoderTestBase::kInitialMemoryValue;
const uint32_t GLES2DecoderTestBase::kNewClientId;
const uint32_t GLES2DecoderTestBase::kNewServiceId;
const uint32_t GLES2DecoderTestBase::kInvalidClientId;
const GLuint GLES2DecoderTestBase::kServiceVertexShaderId;
const GLuint GLES2DecoderTestBase::kServiceFragmentShaderId;
const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumShaderId;
const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumProgramId;
const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumTextureBufferId;
const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumVertexBufferId;
const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumFBOId;
const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumPositionAttrib;
const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumTexAttrib;
const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumSamplerLocation;
const GLsizei GLES2DecoderTestBase::kNumVertices;
const GLsizei GLES2DecoderTestBase::kNumIndices;
const int GLES2DecoderTestBase::kValidIndexRangeStart;
const int GLES2DecoderTestBase::kValidIndexRangeCount;
const int GLES2DecoderTestBase::kInvalidIndexRangeStart;
const int GLES2DecoderTestBase::kInvalidIndexRangeCount;
const int GLES2DecoderTestBase::kOutOfRangeIndexRangeEnd;
const GLuint GLES2DecoderTestBase::kMaxValidIndex;
const GLint GLES2DecoderTestBase::kMaxAttribLength;
const GLint GLES2DecoderTestBase::kAttrib1Size;
const GLint GLES2DecoderTestBase::kAttrib2Size;
const GLint GLES2DecoderTestBase::kAttrib3Size;
const GLint GLES2DecoderTestBase::kAttrib1Location;
const GLint GLES2DecoderTestBase::kAttrib2Location;
const GLint GLES2DecoderTestBase::kAttrib3Location;
const GLenum GLES2DecoderTestBase::kAttrib1Type;
const GLenum GLES2DecoderTestBase::kAttrib2Type;
const GLenum GLES2DecoderTestBase::kAttrib3Type;
const GLint GLES2DecoderTestBase::kInvalidAttribLocation;
const GLint GLES2DecoderTestBase::kBadAttribIndex;
const GLint GLES2DecoderTestBase::kMaxUniformLength;
const GLint GLES2DecoderTestBase::kUniform1Size;
const GLint GLES2DecoderTestBase::kUniform2Size;
const GLint GLES2DecoderTestBase::kUniform3Size;
const GLint GLES2DecoderTestBase::kUniform4Size;
const GLint GLES2DecoderTestBase::kUniform5Size;
const GLint GLES2DecoderTestBase::kUniform6Size;
const GLint GLES2DecoderTestBase::kUniform7Size;
const GLint GLES2DecoderTestBase::kUniform8Size;
const GLint GLES2DecoderTestBase::kUniform1RealLocation;
const GLint GLES2DecoderTestBase::kUniform2RealLocation;
const GLint GLES2DecoderTestBase::kUniform2ElementRealLocation;
const GLint GLES2DecoderTestBase::kUniform3RealLocation;
const GLint GLES2DecoderTestBase::kUniform4RealLocation;
const GLint GLES2DecoderTestBase::kUniform5RealLocation;
const GLint GLES2DecoderTestBase::kUniform6RealLocation;
const GLint GLES2DecoderTestBase::kUniform7RealLocation;
const GLint GLES2DecoderTestBase::kUniform8RealLocation;
const GLint GLES2DecoderTestBase::kUniform1FakeLocation;
const GLint GLES2DecoderTestBase::kUniform2FakeLocation;
const GLint GLES2DecoderTestBase::kUniform2ElementFakeLocation;
const GLint GLES2DecoderTestBase::kUniform3FakeLocation;
const GLint GLES2DecoderTestBase::kUniform4FakeLocation;
const GLint GLES2DecoderTestBase::kUniform5FakeLocation;
const GLint GLES2DecoderTestBase::kUniform6FakeLocation;
const GLint GLES2DecoderTestBase::kUniform7FakeLocation;
const GLint GLES2DecoderTestBase::kUniform8FakeLocation;
const GLint GLES2DecoderTestBase::kUniform1DesiredLocation;
const GLint GLES2DecoderTestBase::kUniform2DesiredLocation;
const GLint GLES2DecoderTestBase::kUniform3DesiredLocation;
const GLint GLES2DecoderTestBase::kUniform4DesiredLocation;
const GLint GLES2DecoderTestBase::kUniform5DesiredLocation;
const GLint GLES2DecoderTestBase::kUniform6DesiredLocation;
const GLint GLES2DecoderTestBase::kUniform7DesiredLocation;
const GLint GLES2DecoderTestBase::kUniform8DesiredLocation;
const GLenum GLES2DecoderTestBase::kUniform1Type;
const GLenum GLES2DecoderTestBase::kUniform2Type;
const GLenum GLES2DecoderTestBase::kUniform3Type;
const GLenum GLES2DecoderTestBase::kUniform4Type;
const GLenum GLES2DecoderTestBase::kUniform5Type;
const GLenum GLES2DecoderTestBase::kUniform6Type;
const GLenum GLES2DecoderTestBase::kUniform7Type;
const GLenum GLES2DecoderTestBase::kUniform8Type;
const GLenum GLES2DecoderTestBase::kUniformCubemapType;
const GLint GLES2DecoderTestBase::kInvalidUniformLocation;
const GLint GLES2DecoderTestBase::kBadUniformIndex;
const GLint GLES2DecoderTestBase::kOutputVariable1Size;
const GLenum GLES2DecoderTestBase::kOutputVariable1Type;
const GLuint GLES2DecoderTestBase::kOutputVariable1ColorName;
const GLuint GLES2DecoderTestBase::kOutputVariable1Index;
#endif
const char* GLES2DecoderTestBase::kAttrib1Name = …;
const char* GLES2DecoderTestBase::kAttrib2Name = …;
const char* GLES2DecoderTestBase::kAttrib3Name = …;
const char* GLES2DecoderTestBase::kUniform1Name = …;
const char* GLES2DecoderTestBase::kUniform2Name = …;
const char* GLES2DecoderTestBase::kUniform3Name = …;
const char* GLES2DecoderTestBase::kUniform4Name = …;
const char* GLES2DecoderTestBase::kUniform5Name = …;
const char* GLES2DecoderTestBase::kUniform6Name = …;
const char* GLES2DecoderTestBase::kUniform7Name = …;
const char* GLES2DecoderTestBase::kUniform8Name = …;
const char* GLES2DecoderTestBase::kOutputVariable1Name = …;
const char* GLES2DecoderTestBase::kOutputVariable1NameESSL3 = …;
void GLES2DecoderTestBase::SetupDefaultProgram() { … }
void GLES2DecoderTestBase::SetupCubemapProgram() { … }
void GLES2DecoderTestBase::SetupSamplerExternalProgram() { … }
void GLES2DecoderWithShaderTestBase::TearDown() { … }
void GLES2DecoderTestBase::SetupShader(
GLES2DecoderTestBase::AttribInfo* attribs, size_t num_attribs,
GLES2DecoderTestBase::UniformInfo* uniforms, size_t num_uniforms,
GLuint program_client_id, GLuint program_service_id,
GLuint vertex_shader_client_id, GLuint vertex_shader_service_id,
GLuint fragment_shader_client_id, GLuint fragment_shader_service_id) { … }
void GLES2DecoderTestBase::DoEnableDisable(GLenum cap, bool enable) { … }
void GLES2DecoderTestBase::SetDriverVertexAttribEnabled(GLint index,
bool enable) { … }
void GLES2DecoderTestBase::DoEnableVertexAttribArray(GLint index) { … }
void GLES2DecoderTestBase::DoBufferData(GLenum target, GLsizei size) { … }
void GLES2DecoderTestBase::DoBufferSubData(
GLenum target, GLint offset, GLsizei size, const void* data) { … }
void GLES2DecoderTestBase::DoScissor(GLint x,
GLint y,
GLsizei width,
GLsizei height) { … }
void GLES2DecoderTestBase::DoPixelStorei(GLenum pname, GLint param) { … }
void GLES2DecoderTestBase::SetupVertexBuffer() { … }
void GLES2DecoderTestBase::SetupAllNeededVertexBuffers() { … }
void GLES2DecoderTestBase::SetupIndexBuffer() { … }
void GLES2DecoderTestBase::SetupTexture() { … }
void GLES2DecoderTestBase::SetupSampler() { … }
void GLES2DecoderTestBase::DeleteVertexBuffer() { … }
void GLES2DecoderTestBase::DeleteIndexBuffer() { … }
void GLES2DecoderTestBase::SetupMockGLBehaviors() { … }
void GLES2DecoderWithShaderTestBase::SetUp() { … }
void GLES2DecoderTestBase::DoInitializeDiscardableTextureCHROMIUM(
GLuint texture_id) { … }
void GLES2DecoderTestBase::DoUnlockDiscardableTextureCHROMIUM(
GLuint texture_id) { … }
void GLES2DecoderTestBase::DoLockDiscardableTextureCHROMIUM(GLuint texture_id) { … }
namespace {
GpuPreferences GenerateGpuPreferencesForPassthroughTests() { … }
}
GLES2DecoderPassthroughTestBase::GLES2DecoderPassthroughTestBase(
ContextType context_type)
: … { … }
GLES2DecoderPassthroughTestBase::~GLES2DecoderPassthroughTestBase() = default;
void GLES2DecoderPassthroughTestBase::OnConsoleMessage(
int32_t id,
const std::string& message) { … }
void GLES2DecoderPassthroughTestBase::CacheBlob(gpu::GpuDiskCacheType type,
const std::string& key,
const std::string& blob) { … }
void GLES2DecoderPassthroughTestBase::OnFenceSyncRelease(uint64_t release) { … }
void GLES2DecoderPassthroughTestBase::OnDescheduleUntilFinished() { … }
void GLES2DecoderPassthroughTestBase::OnRescheduleAfterFinished() { … }
void GLES2DecoderPassthroughTestBase::OnSwapBuffers(uint64_t swap_id,
uint32_t flags) { … }
bool GLES2DecoderPassthroughTestBase::ShouldYield() { … }
void GLES2DecoderPassthroughTestBase::SetUp() { … }
void GLES2DecoderPassthroughTestBase::TearDown() { … }
void GLES2DecoderPassthroughTestBase::SetBucketData(uint32_t bucket_id,
const void* data,
size_t data_size) { … }
GLint GLES2DecoderPassthroughTestBase::GetGLError() { … }
void GLES2DecoderPassthroughTestBase::DoRequestExtension(
const char* extension) { … }
void GLES2DecoderPassthroughTestBase::DoBindBuffer(GLenum target,
GLuint client_id) { … }
void GLES2DecoderPassthroughTestBase::DoDeleteBuffer(GLuint client_id) { … }
void GLES2DecoderPassthroughTestBase::DoBufferData(GLenum target,
GLsizei size,
const void* data,
GLenum usage) { … }
void GLES2DecoderPassthroughTestBase::DoBufferSubData(GLenum target,
GLint offset,
GLsizeiptr size,
const void* data) { … }
void GLES2DecoderPassthroughTestBase::DoGenTexture(GLuint client_id) { … }
bool GLES2DecoderPassthroughTestBase::DoIsTexture(GLuint client_id) { … }
void GLES2DecoderPassthroughTestBase::DoBindTexture(GLenum target,
GLuint client_id) { … }
void GLES2DecoderPassthroughTestBase::DoDeleteTexture(GLuint client_id) { … }
void GLES2DecoderPassthroughTestBase::DoTexImage2D(
GLenum target,
GLint level,
GLenum internal_format,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
uint32_t shared_memory_id,
uint32_t shared_memory_offset) { … }
void GLES2DecoderPassthroughTestBase::DoBindFramebuffer(GLenum target,
GLuint client_id) { … }
void GLES2DecoderPassthroughTestBase::DoFramebufferTexture2D(
GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture_client_id,
GLint level) { … }
void GLES2DecoderPassthroughTestBase::DoFramebufferRenderbuffer(
GLenum target,
GLenum attachment,
GLenum renderbuffertarget,
GLuint renderbuffer) { … }
void GLES2DecoderPassthroughTestBase::DoBindRenderbuffer(GLenum target,
GLuint client_id) { … }
void GLES2DecoderPassthroughTestBase::DoGetIntegerv(GLenum pname,
GLint* result,
size_t num_results) { … }
void GLES2DecoderPassthroughTestBase::DoInitializeDiscardableTextureCHROMIUM(
GLuint client_id) { … }
void GLES2DecoderPassthroughTestBase::DoUnlockDiscardableTextureCHROMIUM(
GLuint client_id) { … }
void GLES2DecoderPassthroughTestBase::DoLockDiscardableTextureCHROMIUM(
GLuint client_id) { … }
#ifndef COMPILER_MSVC
const size_t GLES2DecoderPassthroughTestBase::kSharedBufferSize;
const uint32_t GLES2DecoderPassthroughTestBase::kSharedMemoryOffset;
const uint32_t GLES2DecoderPassthroughTestBase::kInvalidSharedMemoryOffset;
const int32_t GLES2DecoderPassthroughTestBase::kInvalidSharedMemoryId;
const uint32_t GLES2DecoderPassthroughTestBase::kNewClientId;
const GLuint GLES2DecoderPassthroughTestBase::kClientBufferId;
const GLuint GLES2DecoderPassthroughTestBase::kClientTextureId;
const GLuint GLES2DecoderPassthroughTestBase::kClientFramebufferId;
const GLuint GLES2DecoderPassthroughTestBase::kClientRenderbufferId;
#endif
}
}