diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 10:22:43 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 12:36:28 +0000 |
commit | 271a6c3487a14599023a9106329505597638d793 (patch) | |
tree | e040d58ffc86c1480b79ca8528020ca9ec919bf8 /chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h | |
parent | 7b2ffa587235a47d4094787d72f38102089f402a (diff) | |
download | qtwebengine-chromium-271a6c3487a14599023a9106329505597638d793.tar.gz |
BASELINE: Update Chromium to 77.0.3865.59
Change-Id: I1e89a5f3b009a9519a6705102ad65c92fe736f21
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h')
-rw-r--r-- | chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h | 49 |
1 files changed, 20 insertions, 29 deletions
diff --git a/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h index d81387cf5f9..74ace1d1e3a 100644 --- a/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h +++ b/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h @@ -11,7 +11,7 @@ #include <array> #include <memory> -#include "base/message_loop/message_loop.h" +#include "base/test/scoped_task_environment.h" #include "gpu/command_buffer/client/client_test_helper.h" #include "gpu/command_buffer/common/gles2_cmd_format.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h" @@ -216,24 +216,29 @@ class GLES2DecoderTestBase : public ::testing::TestWithParam<bool>, struct InitState { InitState(); InitState(const InitState& other); - - std::string extensions; - std::string gl_version; - bool has_alpha; - bool has_depth; - bool has_stencil; - bool request_alpha; - bool request_depth; - bool request_stencil; - bool bind_generates_resource; - bool lose_context_when_out_of_memory; - bool use_native_vao; // default is true. - ContextType context_type; + InitState& operator=(const InitState& other); + + std::string extensions = "GL_EXT_framebuffer_object"; + std::string gl_version = "2.1"; + bool has_alpha = false; + bool has_depth = false; + bool has_stencil = false; + bool request_alpha = false; + bool request_depth = false; + bool request_stencil = false; + bool bind_generates_resource = false; + bool lose_context_when_out_of_memory = false; + bool lose_context_on_init = false; + bool use_native_vao = true; + ContextType context_type = CONTEXT_TYPE_OPENGLES2; }; void InitDecoder(const InitState& init); void InitDecoderWithWorkarounds(const InitState& init, const GpuDriverBugWorkarounds& workarounds); + ContextResult MaybeInitDecoderWithWorkarounds( + const InitState& init, + const GpuDriverBugWorkarounds& workarounds); void ResetDecoder(); @@ -273,10 +278,6 @@ class GLES2DecoderTestBase : public ::testing::TestWithParam<bool>, GLuint vertex_shader_client_id, GLuint vertex_shader_service_id, GLuint fragment_shader_client_id, GLuint fragment_shader_service_id); - void SetupInitCapabilitiesExpectations(bool es3_capable); - void SetupInitStateExpectations(bool es3_capable); - void ExpectEnableDisable(GLenum cap, bool enable); - // Setups up a shader for testing glUniform. void SetupShaderForUniform(GLenum uniform_type); void SetupDefaultProgram(); @@ -561,11 +562,6 @@ class GLES2DecoderTestBase : public ::testing::TestWithParam<bool>, static const GLint kMaxViewportWidth = 8192; static const GLint kMaxViewportHeight = 8192; - static const GLint kViewportX = 0; - static const GLint kViewportY = 0; - static const GLint kViewportWidth = kBackBufferWidth; - static const GLint kViewportHeight = kBackBufferHeight; - static const GLuint kServiceAttrib0BufferId = 801; static const GLuint kServiceFixedAttribBufferId = 802; @@ -799,11 +795,6 @@ class GLES2DecoderTestBase : public ::testing::TestWithParam<bool>, void AddExpectationsForVertexAttribManager(); void SetupMockGLBehaviors(); - void SetupInitStateManualExpectations(bool es3_capable); - void SetupInitStateManualExpectationsForWindowRectanglesEXT(GLenum mode, - GLint count); - void SetupInitStateManualExpectationsForDoLineWidth(GLfloat width); - GpuPreferences gpu_preferences_; MailboxManagerImpl mailbox_manager_; ShaderTranslatorCache shader_translator_cache_; @@ -813,7 +804,7 @@ class GLES2DecoderTestBase : public ::testing::TestWithParam<bool>, SharedImageManager shared_image_manager_; scoped_refptr<ContextGroup> group_; MockGLStates gl_states_; - base::MessageLoop message_loop_; + base::test::ScopedTaskEnvironment scoped_task_environment_; MockCopyTextureResourceManager* copy_texture_manager_; // not owned MockCopyTexImageResourceManager* copy_tex_image_blitter_; // not owned |