diff options
author | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-05 15:41:19 +0000 |
---|---|---|
committer | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-05 15:41:19 +0000 |
commit | 956aec5a0fe6dd7a35ed20947c07c88ab1632a5c (patch) | |
tree | 4df3200cdd65d4fc8d7246247a69edd92d5e0cd2 /gpu | |
parent | faca50ae7596c14eaadc18a7afe5367bf961518b (diff) | |
download | chromium_src-956aec5a0fe6dd7a35ed20947c07c88ab1632a5c.zip chromium_src-956aec5a0fe6dd7a35ed20947c07c88ab1632a5c.tar.gz chromium_src-956aec5a0fe6dd7a35ed20947c07c88ab1632a5c.tar.bz2 |
FeatureInfo: Remove allowed_extensions and init workarounds early
This removes passing allowed_extensions all the way through, since it
was ignored anyways. It also initializes the workarounds from the
commandline during FeatureInfo construction so it can be used to
make decisions before the first context is created and initialized.
Review URL: https://chromiumcodereview.appspot.com/23660006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221438 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
19 files changed, 84 insertions, 129 deletions
diff --git a/gpu/command_buffer/client/gl_in_process_context.cc b/gpu/command_buffer/client/gl_in_process_context.cc index a8e33b6..cf0c8a7 100644 --- a/gpu/command_buffer/client/gl_in_process_context.cc +++ b/gpu/command_buffer/client/gl_in_process_context.cc @@ -57,7 +57,6 @@ class GLInProcessContextImpl bool share_resources, gfx::AcceleratedWidget window, const gfx::Size& size, - const char* allowed_extensions, const GLInProcessContextAttribs& attribs, gfx::GpuPreference gpu_preference); @@ -153,7 +152,6 @@ bool GLInProcessContextImpl::Initialize( bool share_resources, gfx::AcceleratedWidget window, const gfx::Size& size, - const char* allowed_extensions, const GLInProcessContextAttribs& attribs, gfx::GpuPreference gpu_preference) { DCHECK(size.width() >= 0 && size.height() >= 0); @@ -233,7 +231,6 @@ bool GLInProcessContextImpl::Initialize( share_resources, window, size, - allowed_extensions, attrib_vector, gpu_preference, wrapped_callback, @@ -367,7 +364,6 @@ GLInProcessContext* GLInProcessContext::CreateContext( gfx::AcceleratedWidget window, const gfx::Size& size, bool share_resources, - const char* allowed_extensions, const GLInProcessContextAttribs& attribs, gfx::GpuPreference gpu_preference) { scoped_ptr<GLInProcessContextImpl> context( @@ -378,7 +374,6 @@ GLInProcessContext* GLInProcessContext::CreateContext( share_resources, window, size, - allowed_extensions, attribs, gpu_preference)) return NULL; @@ -390,7 +385,6 @@ GLInProcessContext* GLInProcessContext::CreateContext( GLInProcessContext* GLInProcessContext::CreateWithSurface( scoped_refptr<gfx::GLSurface> surface, bool share_resources, - const char* allowed_extensions, const GLInProcessContextAttribs& attribs, gfx::GpuPreference gpu_preference) { scoped_ptr<GLInProcessContextImpl> context( @@ -401,7 +395,6 @@ GLInProcessContext* GLInProcessContext::CreateWithSurface( share_resources, gfx::kNullAcceleratedWidget, surface->GetSize(), - allowed_extensions, attribs, gpu_preference)) return NULL; diff --git a/gpu/command_buffer/client/gl_in_process_context.h b/gpu/command_buffer/client/gl_in_process_context.h index 3fe82aa..1be0d9d 100644 --- a/gpu/command_buffer/client/gl_in_process_context.h +++ b/gpu/command_buffer/client/gl_in_process_context.h @@ -54,7 +54,6 @@ class GLES2_IMPL_EXPORT GLInProcessContext { gfx::AcceleratedWidget window, const gfx::Size& size, bool share_resources, - const char* allowed_extensions, const GLInProcessContextAttribs& attribs, gfx::GpuPreference gpu_preference); @@ -65,7 +64,6 @@ class GLES2_IMPL_EXPORT GLInProcessContext { static GLInProcessContext* CreateWithSurface( scoped_refptr<gfx::GLSurface> surface, bool share_resources, - const char* allowed_extensions, const GLInProcessContextAttribs& attribs, gfx::GpuPreference gpu_preference); diff --git a/gpu/command_buffer/service/buffer_manager_unittest.cc b/gpu/command_buffer/service/buffer_manager_unittest.cc index f6fb838..444c393 100644 --- a/gpu/command_buffer/service/buffer_manager_unittest.cc +++ b/gpu/command_buffer/service/buffer_manager_unittest.cc @@ -27,7 +27,7 @@ class BufferManagerTestBase : public testing::Test { ::gfx::GLInterface::SetGLInterface(gl_.get()); if (feature_info) { TestHelper::SetupFeatureInfoInitExpectations(gl_.get(), extensions); - feature_info->Initialize(NULL); + feature_info->Initialize(); } error_state_.reset(new MockErrorState()); manager_.reset(new BufferManager(memory_tracker, feature_info)); diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc index ac3f318..bb6ad71 100644 --- a/gpu/command_buffer/service/context_group.cc +++ b/gpu/command_buffer/service/context_group.cc @@ -77,15 +77,14 @@ static void GetIntegerv(GLenum pname, uint32* var) { bool ContextGroup::Initialize( GLES2Decoder* decoder, - const DisallowedFeatures& disallowed_features, - const char* allowed_features) { + const DisallowedFeatures& disallowed_features) { // If we've already initialized the group just add the context. if (HaveContexts()) { decoders_.push_back(base::AsWeakPtr<GLES2Decoder>(decoder)); return true; } - if (!feature_info_->Initialize(disallowed_features, allowed_features)) { + if (!feature_info_->Initialize(disallowed_features)) { LOG(ERROR) << "ContextGroup::Initialize failed because FeatureInfo " << "initialization failed."; return false; diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h index 13d031a..dd236ff 100644 --- a/gpu/command_buffer/service/context_group.h +++ b/gpu/command_buffer/service/context_group.h @@ -54,8 +54,7 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { // call to destroy if it succeeds. bool Initialize( GLES2Decoder* decoder, - const DisallowedFeatures& disallowed_features, - const char* allowed_features); + const DisallowedFeatures& disallowed_features); // Destroys all the resources when called for the last context in the group. // It should only be called by GLES2Decoder. diff --git a/gpu/command_buffer/service/context_group_unittest.cc b/gpu/command_buffer/service/context_group_unittest.cc index c80f619..59bc796 100644 --- a/gpu/command_buffer/service/context_group_unittest.cc +++ b/gpu/command_buffer/service/context_group_unittest.cc @@ -72,7 +72,7 @@ TEST_F(ContextGroupTest, Basic) { TEST_F(ContextGroupTest, InitializeNoExtensions) { TestHelper::SetupContextGroupInitExpectations(gl_.get(), DisallowedFeatures(), ""); - group_->Initialize(decoder_.get(), DisallowedFeatures(), ""); + group_->Initialize(decoder_.get(), DisallowedFeatures()); EXPECT_EQ(static_cast<uint32>(TestHelper::kNumVertexAttribs), group_->max_vertex_attribs()); EXPECT_EQ(static_cast<uint32>(TestHelper::kNumTextureUnits), @@ -107,8 +107,8 @@ TEST_F(ContextGroupTest, MultipleContexts) { scoped_ptr<MockGLES2Decoder> decoder2_(new MockGLES2Decoder()); TestHelper::SetupContextGroupInitExpectations(gl_.get(), DisallowedFeatures(), ""); - group_->Initialize(decoder_.get(), DisallowedFeatures(), ""); - group_->Initialize(decoder2_.get(), DisallowedFeatures(), ""); + group_->Initialize(decoder_.get(), DisallowedFeatures()); + group_->Initialize(decoder2_.get(), DisallowedFeatures()); EXPECT_TRUE(group_->buffer_manager() != NULL); EXPECT_TRUE(group_->framebuffer_manager() != NULL); diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index 453b43d..eeeabd9 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc @@ -133,6 +133,22 @@ FeatureInfo::Workarounds::Workarounds() : } FeatureInfo::FeatureInfo() { + InitializeBasicState(*CommandLine::ForCurrentProcess()); +} + +FeatureInfo::FeatureInfo(const CommandLine& command_line) { + InitializeBasicState(command_line); +} + +void FeatureInfo::InitializeBasicState(const CommandLine& command_line) { + if (command_line.HasSwitch(switches::kGpuDriverBugWorkarounds)) { + std::string types = command_line.GetSwitchValueASCII( + switches::kGpuDriverBugWorkarounds); + StringToWorkarounds(types, &workarounds_); + } + feature_flags_.enable_shader_name_hashing = + !command_line.HasSwitch(switches::kDisableShaderNameHashing); + static const GLenum kAlphaTypes[] = { GL_UNSIGNED_BYTE, }; @@ -168,33 +184,23 @@ FeatureInfo::FeatureInfo() { } } -bool FeatureInfo::Initialize(const char* allowed_features) { +bool FeatureInfo::Initialize() { disallowed_features_ = DisallowedFeatures(); - AddFeatures(*CommandLine::ForCurrentProcess()); + InitializeFeatures(); return true; } -bool FeatureInfo::Initialize(const DisallowedFeatures& disallowed_features, - const char* allowed_features) { +bool FeatureInfo::Initialize(const DisallowedFeatures& disallowed_features) { disallowed_features_ = disallowed_features; - AddFeatures(*CommandLine::ForCurrentProcess()); + InitializeFeatures(); return true; } -void FeatureInfo::AddFeatures(const CommandLine& command_line) { +void FeatureInfo::InitializeFeatures() { // Figure out what extensions to turn on. StringSet extensions( reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS))); - if (command_line.HasSwitch(switches::kGpuDriverBugWorkarounds)) { - std::string types = command_line.GetSwitchValueASCII( - switches::kGpuDriverBugWorkarounds); - StringToWorkarounds(types, &workarounds_); - } - - feature_flags_.enable_shader_name_hashing = - !command_line.HasSwitch(switches::kDisableShaderNameHashing); - bool npot_ok = false; AddExtensionString("GL_ANGLE_translated_shader_source"); diff --git a/gpu/command_buffer/service/feature_info.h b/gpu/command_buffer/service/feature_info.h index 8b33bb1..782b3a8 100644 --- a/gpu/command_buffer/service/feature_info.h +++ b/gpu/command_buffer/service/feature_info.h @@ -64,16 +64,15 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { GLint max_cube_map_texture_size; }; + // Constructor with workarounds taken from the current process's CommandLine FeatureInfo(); - // If allowed features = NULL or "*", all features are allowed. Otherwise - // only features that match the strings in allowed_features are allowed. - bool Initialize(const char* allowed_features); - bool Initialize(const DisallowedFeatures& disallowed_features, - const char* allowed_features); + // Constructor with workarounds taken from |command_line| + FeatureInfo(const CommandLine& command_line); - // Turns on certain features if they can be turned on. - void AddFeatures(const CommandLine& command_line); + // Initializes the feature information. Needs a current GL context. + bool Initialize(); + bool Initialize(const DisallowedFeatures& disallowed_features); const Validators* validators() const { return &validators_; @@ -106,6 +105,8 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { ~FeatureInfo(); void AddExtensionString(const std::string& str); + void InitializeBasicState(const CommandLine& command_line); + void InitializeFeatures(); Validators validators_; diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc index 1d1cba4..97cc76b 100644 --- a/gpu/command_buffer/service/feature_info_unittest.cc +++ b/gpu/command_buffer/service/feature_info_unittest.cc @@ -45,13 +45,30 @@ class FeatureInfoTest : public testing::Test { const char* extensions, const char* version) { TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( gl_.get(), extensions, version); + info_ = new FeatureInfo(); + info_->Initialize(); + } + + void SetupWithCommandLine(const CommandLine& command_line) { + info_ = new FeatureInfo(command_line); + } + + void SetupInitExpectationsWithCommandLine( + const char* extensions, const CommandLine& command_line) { + TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( + gl_.get(), extensions, ""); + info_ = new FeatureInfo(command_line); + info_->Initialize(); + } + + void SetupWithoutInit() { + info_ = new FeatureInfo(); } protected: virtual void SetUp() { gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>()); ::gfx::GLInterface::SetGLInterface(gl_.get()); - info_ = new FeatureInfo(); } virtual void TearDown() { @@ -75,6 +92,7 @@ struct FormatInfo { } // anonymous namespace. TEST_F(FeatureInfoTest, Basic) { + SetupWithoutInit(); // Test it starts off uninitialized. EXPECT_FALSE(info_->feature_flags().chromium_framebuffer_multisample); EXPECT_FALSE(info_->feature_flags().multisampled_render_to_texture); @@ -199,7 +217,6 @@ TEST_F(FeatureInfoTest, Basic) { TEST_F(FeatureInfoTest, InitializeNoExtensions) { SetupInitExpectations(""); - info_->Initialize(NULL); // Check default extensions are there EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_resource_safe")); EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_strict_attribs")); @@ -272,21 +289,18 @@ TEST_F(FeatureInfoTest, InitializeNoExtensions) { TEST_F(FeatureInfoTest, InitializeNPOTExtensionGLES) { SetupInitExpectations("GL_OES_texture_npot"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_npot")); EXPECT_TRUE(info_->feature_flags().npot_ok); } TEST_F(FeatureInfoTest, InitializeNPOTExtensionGL) { SetupInitExpectations("GL_ARB_texture_non_power_of_two"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_npot")); EXPECT_TRUE(info_->feature_flags().npot_ok); } TEST_F(FeatureInfoTest, InitializeDXTExtensionGLES2) { SetupInitExpectations("GL_EXT_texture_compression_dxt1"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_texture_compression_dxt1")); EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid( @@ -301,7 +315,6 @@ TEST_F(FeatureInfoTest, InitializeDXTExtensionGLES2) { TEST_F(FeatureInfoTest, InitializeDXTExtensionGL) { SetupInitExpectations("GL_EXT_texture_compression_s3tc"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_texture_compression_dxt1")); EXPECT_THAT(info_->extensions(), @@ -320,7 +333,6 @@ TEST_F(FeatureInfoTest, InitializeDXTExtensionGL) { TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888GLES2) { SetupInitExpectations("GL_EXT_texture_format_BGRA8888"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_texture_format_BGRA8888")); EXPECT_TRUE(info_->validators()->texture_format.IsValid( @@ -333,7 +345,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888GLES2) { TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888GL) { SetupInitExpectations("GL_EXT_bgra"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_texture_format_BGRA8888")); EXPECT_THAT(info_->extensions(), @@ -350,7 +361,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888GL) { TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888Apple) { SetupInitExpectations("GL_APPLE_texture_format_BGRA8888"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_texture_format_BGRA8888")); EXPECT_TRUE(info_->validators()->texture_format.IsValid( @@ -363,7 +373,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888Apple) { TEST_F(FeatureInfoTest, InitializeEXT_read_format_bgra) { SetupInitExpectations("GL_EXT_read_format_bgra"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_read_format_bgra")); EXPECT_FALSE(info_->validators()->texture_format.IsValid( @@ -376,7 +385,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_read_format_bgra) { TEST_F(FeatureInfoTest, InitializeOES_texture_floatGLES2) { SetupInitExpectations("GL_OES_texture_float"); - info_->Initialize(NULL); EXPECT_FALSE(info_->feature_flags().enable_texture_float_linear); EXPECT_FALSE(info_->feature_flags().enable_texture_half_float_linear); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_float")); @@ -411,7 +419,6 @@ TEST_F(FeatureInfoTest, InitializeOES_texture_floatGLES2) { TEST_F(FeatureInfoTest, InitializeOES_texture_float_linearGLES2) { SetupInitExpectations("GL_OES_texture_float GL_OES_texture_float_linear"); - info_->Initialize(NULL); EXPECT_TRUE(info_->feature_flags().enable_texture_float_linear); EXPECT_FALSE(info_->feature_flags().enable_texture_half_float_linear); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_float")); @@ -445,7 +452,6 @@ TEST_F(FeatureInfoTest, InitializeOES_texture_float_linearGLES2) { TEST_F(FeatureInfoTest, InitializeOES_texture_half_floatGLES2) { SetupInitExpectations("GL_OES_texture_half_float"); - info_->Initialize(NULL); EXPECT_FALSE(info_->feature_flags().enable_texture_float_linear); EXPECT_FALSE(info_->feature_flags().enable_texture_half_float_linear); EXPECT_THAT(info_->extensions(), Not(HasSubstr("GL_OES_texture_float"))); @@ -481,7 +487,6 @@ TEST_F(FeatureInfoTest, InitializeOES_texture_half_floatGLES2) { TEST_F(FeatureInfoTest, InitializeOES_texture_half_float_linearGLES2) { SetupInitExpectations( "GL_OES_texture_half_float GL_OES_texture_half_float_linear"); - info_->Initialize(NULL); EXPECT_FALSE(info_->feature_flags().enable_texture_float_linear); EXPECT_TRUE(info_->feature_flags().enable_texture_half_float_linear); EXPECT_THAT(info_->extensions(), Not(HasSubstr("GL_OES_texture_float"))); @@ -516,7 +521,6 @@ TEST_F(FeatureInfoTest, InitializeOES_texture_half_float_linearGLES2) { TEST_F(FeatureInfoTest, InitializeEXT_framebuffer_multisample) { SetupInitExpectations("GL_EXT_framebuffer_multisample"); - info_->Initialize(NULL); EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample); EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_framebuffer_multisample")); @@ -534,7 +538,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_framebuffer_multisample) { TEST_F(FeatureInfoTest, InitializeEXT_multisampled_render_to_texture) { SetupInitExpectations("GL_EXT_multisampled_render_to_texture"); - info_->Initialize(NULL); EXPECT_TRUE(info_->feature_flags( ).multisampled_render_to_texture); EXPECT_FALSE(info_->feature_flags( @@ -551,7 +554,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_multisampled_render_to_texture) { TEST_F(FeatureInfoTest, InitializeIMG_multisampled_render_to_texture) { SetupInitExpectations("GL_IMG_multisampled_render_to_texture"); - info_->Initialize(NULL); EXPECT_TRUE(info_->feature_flags( ).use_img_for_multisampled_render_to_texture); EXPECT_TRUE(info_->feature_flags( @@ -568,7 +570,6 @@ TEST_F(FeatureInfoTest, InitializeIMG_multisampled_render_to_texture) { TEST_F(FeatureInfoTest, InitializeEXT_texture_filter_anisotropic) { SetupInitExpectations("GL_EXT_texture_filter_anisotropic"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_texture_filter_anisotropic")); EXPECT_TRUE(info_->validators()->texture_parameter.IsValid( @@ -579,7 +580,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_texture_filter_anisotropic) { TEST_F(FeatureInfoTest, InitializeEXT_ARB_depth_texture) { SetupInitExpectations("GL_ARB_depth_texture"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_GOOGLE_depth_texture")); EXPECT_THAT(info_->extensions(), @@ -600,7 +600,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_ARB_depth_texture) { TEST_F(FeatureInfoTest, InitializeOES_ARB_depth_texture) { SetupInitExpectations("GL_OES_depth_texture"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_GOOGLE_depth_texture")); EXPECT_THAT(info_->extensions(), @@ -621,7 +620,6 @@ TEST_F(FeatureInfoTest, InitializeOES_ARB_depth_texture) { TEST_F(FeatureInfoTest, InitializeANGLE_depth_texture) { SetupInitExpectations("GL_ANGLE_depth_texture"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_GOOGLE_depth_texture")); EXPECT_THAT(info_->extensions(), @@ -650,7 +648,6 @@ TEST_F(FeatureInfoTest, InitializeANGLE_depth_texture) { TEST_F(FeatureInfoTest, InitializeEXT_packed_depth_stencil) { SetupInitExpectations("GL_EXT_packed_depth_stencil"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_packed_depth_stencil")); EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid( @@ -664,7 +661,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_packed_depth_stencil) { TEST_F(FeatureInfoTest, InitializeOES_packed_depth_stencil) { SetupInitExpectations("GL_OES_packed_depth_stencil"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_packed_depth_stencil")); EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid( @@ -679,7 +675,6 @@ TEST_F(FeatureInfoTest, InitializeOES_packed_depth_stencil) { TEST_F(FeatureInfoTest, InitializeOES_packed_depth_stencil_and_GL_ARB_depth_texture) { SetupInitExpectations("GL_OES_packed_depth_stencil GL_ARB_depth_texture"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_packed_depth_stencil")); EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid( @@ -700,7 +695,6 @@ TEST_F(FeatureInfoTest, TEST_F(FeatureInfoTest, InitializeOES_depth24) { SetupInitExpectations("GL_OES_depth24"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_depth24")); EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid( GL_DEPTH_COMPONENT24)); @@ -708,7 +702,6 @@ TEST_F(FeatureInfoTest, InitializeOES_depth24) { TEST_F(FeatureInfoTest, InitializeOES_standard_derivatives) { SetupInitExpectations("GL_OES_standard_derivatives"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_standard_derivatives")); EXPECT_TRUE(info_->feature_flags().oes_standard_derivatives); EXPECT_TRUE(info_->validators()->hint_target.IsValid( @@ -719,7 +712,6 @@ TEST_F(FeatureInfoTest, InitializeOES_standard_derivatives) { TEST_F(FeatureInfoTest, InitializeOES_rgb8_rgba8) { SetupInitExpectations("GL_OES_rgb8_rgba8"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_rgb8_rgba8")); EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid( @@ -730,7 +722,6 @@ TEST_F(FeatureInfoTest, InitializeOES_rgb8_rgba8) { TEST_F(FeatureInfoTest, InitializeOES_EGL_image_external) { SetupInitExpectations("GL_OES_EGL_image_external"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_EGL_image_external")); EXPECT_TRUE(info_->feature_flags().oes_egl_image_external); @@ -746,7 +737,6 @@ TEST_F(FeatureInfoTest, InitializeOES_EGL_image_external) { TEST_F(FeatureInfoTest, InitializeOES_compressed_ETC1_RGB8_texture) { SetupInitExpectations("GL_OES_compressed_ETC1_RGB8_texture"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_compressed_ETC1_RGB8_texture")); EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid( @@ -757,7 +747,6 @@ TEST_F(FeatureInfoTest, InitializeOES_compressed_ETC1_RGB8_texture) { TEST_F(FeatureInfoTest, InitializeCHROMIUM_stream_texture) { SetupInitExpectations("GL_CHROMIUM_stream_texture"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_stream_texture")); EXPECT_TRUE(info_->feature_flags().chromium_stream_texture); @@ -765,7 +754,6 @@ TEST_F(FeatureInfoTest, InitializeCHROMIUM_stream_texture) { TEST_F(FeatureInfoTest, InitializeEXT_occlusion_query_boolean) { SetupInitExpectations("GL_EXT_occlusion_query_boolean"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_occlusion_query_boolean")); EXPECT_TRUE(info_->feature_flags().occlusion_query_boolean); @@ -777,7 +765,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_occlusion_query_boolean) { TEST_F(FeatureInfoTest, InitializeARB_occlusion_query) { SetupInitExpectations("GL_ARB_occlusion_query"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_occlusion_query_boolean")); EXPECT_TRUE(info_->feature_flags().occlusion_query_boolean); @@ -789,7 +776,6 @@ TEST_F(FeatureInfoTest, InitializeARB_occlusion_query) { TEST_F(FeatureInfoTest, InitializeARB_occlusion_query2) { SetupInitExpectations("GL_ARB_occlusion_query2 GL_ARB_occlusion_query2"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_occlusion_query_boolean")); EXPECT_TRUE(info_->feature_flags().occlusion_query_boolean); @@ -801,7 +787,6 @@ TEST_F(FeatureInfoTest, InitializeARB_occlusion_query2) { TEST_F(FeatureInfoTest, InitializeOES_vertex_array_object) { SetupInitExpectations("GL_OES_vertex_array_object"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_vertex_array_object")); EXPECT_TRUE(info_->feature_flags().native_vertex_array_object); @@ -809,7 +794,6 @@ TEST_F(FeatureInfoTest, InitializeOES_vertex_array_object) { TEST_F(FeatureInfoTest, InitializeARB_vertex_array_object) { SetupInitExpectations("GL_ARB_vertex_array_object"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_vertex_array_object")); EXPECT_TRUE(info_->feature_flags().native_vertex_array_object); @@ -817,7 +801,6 @@ TEST_F(FeatureInfoTest, InitializeARB_vertex_array_object) { TEST_F(FeatureInfoTest, InitializeAPPLE_vertex_array_object) { SetupInitExpectations("GL_APPLE_vertex_array_object"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_vertex_array_object")); EXPECT_TRUE(info_->feature_flags().native_vertex_array_object); @@ -825,7 +808,6 @@ TEST_F(FeatureInfoTest, InitializeAPPLE_vertex_array_object) { TEST_F(FeatureInfoTest, InitializeNo_vertex_array_object) { SetupInitExpectations(""); - info_->Initialize(NULL); // Even if the native extensions are not available the implementation // may still emulate the GL_OES_vertex_array_object functionality. In this // scenario native_vertex_array_object must be false. @@ -836,39 +818,35 @@ TEST_F(FeatureInfoTest, InitializeNo_vertex_array_object) { TEST_F(FeatureInfoTest, InitializeOES_element_index_uint) { SetupInitExpectations("GL_OES_element_index_uint"); - info_->Initialize(NULL); EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_element_index_uint")); EXPECT_TRUE(info_->validators()->index_type.IsValid(GL_UNSIGNED_INT)); } TEST_F(FeatureInfoTest, InitializeVAOsWithClientSideArrays) { - SetupInitExpectations("GL_OES_vertex_array_object"); CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS)); - info_->AddFeatures(command_line); + SetupInitExpectationsWithCommandLine("GL_OES_vertex_array_object", + command_line); EXPECT_TRUE(info_->workarounds().use_client_side_arrays_for_stream_buffers); EXPECT_FALSE(info_->feature_flags().native_vertex_array_object); } TEST_F(FeatureInfoTest, InitializeEXT_frag_depth) { SetupInitExpectations("GL_EXT_frag_depth"); - info_->Initialize(NULL); EXPECT_TRUE(info_->feature_flags().ext_frag_depth); EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_frag_depth")); } TEST_F(FeatureInfoTest, InitializeSamplersWithARBSamplerObjects) { SetupInitExpectationsWithGLVersion("GL_ARB_sampler_objects", "OpenGL 3.0"); - info_->Initialize(NULL); EXPECT_TRUE(info_->feature_flags().enable_samplers); } TEST_F(FeatureInfoTest, InitializeWithES3) { SetupInitExpectationsWithGLVersion("", "OpenGL ES 3.0"); - info_->Initialize(NULL); EXPECT_TRUE(info_->feature_flags().enable_samplers); EXPECT_TRUE(info_->feature_flags().map_buffer_range); EXPECT_FALSE(info_->feature_flags().use_async_readpixels); @@ -876,39 +854,33 @@ TEST_F(FeatureInfoTest, InitializeWithES3) { TEST_F(FeatureInfoTest, InitializeWithoutSamplers) { SetupInitExpectationsWithGLVersion("", "OpenGL GL 3.0"); - info_->Initialize(NULL); EXPECT_FALSE(info_->feature_flags().enable_samplers); } TEST_F(FeatureInfoTest, InitializeWithES3AndFences) { SetupInitExpectationsWithGLVersion("EGL_KHR_fence_sync", "OpenGL ES 3.0"); - info_->Initialize(NULL); EXPECT_TRUE(info_->feature_flags().use_async_readpixels); } TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) { - SetupInitExpectations(""); CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::EXIT_ON_CONTEXT_LOST)); - EXPECT_FALSE(info_->workarounds().exit_on_context_lost); - info_->AddFeatures(command_line); + // Workarounds should get parsed without the need for a context. + SetupWithCommandLine(command_line); EXPECT_TRUE(info_->workarounds().exit_on_context_lost); } TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsMultiple) { - SetupInitExpectations(""); CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::EXIT_ON_CONTEXT_LOST) + "," + base::IntToString(gpu::MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_1024) + "," + base::IntToString(gpu::MAX_TEXTURE_SIZE_LIMIT_4096)); - EXPECT_FALSE(info_->workarounds().exit_on_context_lost); - EXPECT_EQ(0, info_->workarounds().max_cube_map_texture_size); - EXPECT_EQ(0, info_->workarounds().max_texture_size); - info_->AddFeatures(command_line); + // Workarounds should get parsed without the need for a context. + SetupWithCommandLine(command_line); EXPECT_TRUE(info_->workarounds().exit_on_context_lost); EXPECT_EQ(1024, info_->workarounds().max_cube_map_texture_size); EXPECT_EQ(4096, info_->workarounds().max_texture_size); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 1489fc6..050010f 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -541,7 +541,6 @@ class GLES2DecoderImpl : public GLES2Decoder { bool offscreen, const gfx::Size& size, const DisallowedFeatures& disallowed_features, - const char* allowed_extensions, const std::vector<int32>& attribs) OVERRIDE; virtual void Destroy(bool have_context) OVERRIDE; virtual void SetSurface( @@ -2121,7 +2120,6 @@ bool GLES2DecoderImpl::Initialize( bool offscreen, const gfx::Size& size, const DisallowedFeatures& disallowed_features, - const char* allowed_extensions, const std::vector<int32>& attribs) { TRACE_EVENT0("gpu", "GLES2DecoderImpl::Initialize"); DCHECK(context->IsCurrent(surface.get())); @@ -2149,7 +2147,7 @@ bool GLES2DecoderImpl::Initialize( context_ = context; surface_ = surface; - if (!group_->Initialize(this, disallowed_features, allowed_extensions)) { + if (!group_->Initialize(this, disallowed_features)) { LOG(ERROR) << "GpuScheduler::InitializeCommon failed because group " << "failed to initialize."; group_ = NULL; // Must not destroy ContextGroup if it is not initialized. @@ -8720,7 +8718,7 @@ error::Error GLES2DecoderImpl::HandleGetRequestableExtensionsCHROMIUM( const cmds::GetRequestableExtensionsCHROMIUM& c) { Bucket* bucket = CreateBucket(c.bucket_id); scoped_refptr<FeatureInfo> info(new FeatureInfo()); - info->Initialize(disallowed_features_, NULL); + info->Initialize(disallowed_features_); bucket->SetFromString(info->extensions().c_str()); return error::kNoError; } diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h index 57445c7..e518702 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder.h @@ -103,9 +103,6 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, // bound, offscreen contexts render to an internal buffer, onscreen ones // to the surface. // size: the size if the GL context is offscreen. - // allowed_extensions: A string in the same format as - // glGetString(GL_EXTENSIONS) that lists the extensions this context - // should allow. Passing NULL or "*" means allow all extensions. // Returns: // true if successful. virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface, @@ -113,7 +110,6 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, bool offscreen, const gfx::Size& size, const DisallowedFeatures& disallowed_features, - const char* allowed_extensions, const std::vector<int32>& attribs) = 0; // Destroys the graphics context. diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h index e6c497f..e993a5e 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h @@ -34,13 +34,12 @@ class MockGLES2Decoder : public GLES2Decoder { MockGLES2Decoder(); virtual ~MockGLES2Decoder(); - MOCK_METHOD7(Initialize, + MOCK_METHOD6(Initialize, bool(const scoped_refptr<gfx::GLSurface>& surface, const scoped_refptr<gfx::GLContext>& context, bool offscreen, const gfx::Size& size, const DisallowedFeatures& disallowed_features, - const char* allowed_extensions, const std::vector<int32>& attribs)); MOCK_METHOD1(Destroy, void(bool have_context)); MOCK_METHOD1(SetSurface, void(const scoped_refptr<gfx::GLSurface>& surface)); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc index e2e3551..3ce4520 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc @@ -119,7 +119,7 @@ void GLES2DecoderTestBase::InitDecoder( // will initialize itself. mock_decoder_.reset(new MockGLES2Decoder()); EXPECT_TRUE( - group_->Initialize(mock_decoder_.get(), DisallowedFeatures(), NULL)); + group_->Initialize(mock_decoder_.get(), DisallowedFeatures())); AddExpectationsForVertexAttribManager(); @@ -267,9 +267,12 @@ void GLES2DecoderTestBase::InitDecoder( decoder_.reset(GLES2Decoder::Create(group_.get())); decoder_->GetLogger()->set_log_synthesized_gl_errors(false); - decoder_->Initialize( - surface_, context_, false, surface_->GetSize(), DisallowedFeatures(), - NULL, attribs); + decoder_->Initialize(surface_, + context_, + false, + surface_->GetSize(), + DisallowedFeatures(), + attribs); decoder_->MakeCurrent(); decoder_->set_engine(engine_.get()); diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc index 3c1249a..972533c 100644 --- a/gpu/command_buffer/service/in_process_command_buffer.cc +++ b/gpu/command_buffer/service/in_process_command_buffer.cc @@ -299,7 +299,6 @@ bool InProcessCommandBuffer::Initialize( bool share_resources, gfx::AcceleratedWidget window, const gfx::Size& size, - const char* allowed_extensions, const std::vector<int32>& attribs, gfx::GpuPreference gpu_preference, const base::Closure& context_lost_callback, @@ -322,7 +321,6 @@ bool InProcessCommandBuffer::Initialize( is_offscreen, window, size, - allowed_extensions, attribs, gpu_preference); @@ -338,7 +336,6 @@ bool InProcessCommandBuffer::InitializeOnGpuThread( bool is_offscreen, gfx::AcceleratedWidget window, const gfx::Size& size, - const char* allowed_extensions, const std::vector<int32>& attribs, gfx::GpuPreference gpu_preference) { CheckSequencedThread(); @@ -465,7 +462,6 @@ bool InProcessCommandBuffer::InitializeOnGpuThread( is_offscreen, size, disallowed_features, - allowed_extensions, attribs)) { LOG(ERROR) << "Could not initialize decoder."; DestroyOnGpuThread(); diff --git a/gpu/command_buffer/service/in_process_command_buffer.h b/gpu/command_buffer/service/in_process_command_buffer.h index 64b466f..e63e11a 100644 --- a/gpu/command_buffer/service/in_process_command_buffer.h +++ b/gpu/command_buffer/service/in_process_command_buffer.h @@ -82,7 +82,6 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer, bool share_resources, gfx::AcceleratedWidget window, const gfx::Size& size, - const char* allowed_extensions, const std::vector<int32>& attribs, gfx::GpuPreference gpu_preference, const base::Closure& context_lost_callback, @@ -134,7 +133,6 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer, bool InitializeOnGpuThread(bool is_offscreen, gfx::AcceleratedWidget window, const gfx::Size& size, - const char* allowed_extensions, const std::vector<int32>& attribs, gfx::GpuPreference gpu_preference); bool DestroyOnGpuThread(); diff --git a/gpu/command_buffer/service/query_manager_unittest.cc b/gpu/command_buffer/service/query_manager_unittest.cc index 63ad4f5..0c08293 100644 --- a/gpu/command_buffer/service/query_manager_unittest.cc +++ b/gpu/command_buffer/service/query_manager_unittest.cc @@ -47,7 +47,7 @@ class QueryManagerTest : public testing::Test { gl_.get(), "GL_EXT_occlusion_query_boolean"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize("*"); + feature_info->Initialize(); manager_.reset(new QueryManager(decoder_.get(), feature_info.get())); } @@ -474,7 +474,7 @@ TEST_F(QueryManagerTest, ARBOcclusionQuery2) { gl_.get(), "GL_ARB_occlusion_query2"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize("*"); + feature_info->Initialize(); scoped_ptr<QueryManager> manager( new QueryManager(decoder_.get(), feature_info.get())); @@ -508,7 +508,7 @@ TEST_F(QueryManagerTest, ARBOcclusionQuery) { gl_.get(), "GL_ARB_occlusion_query"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize("*"); + feature_info->Initialize(); scoped_ptr<QueryManager> manager( new QueryManager(decoder_.get(), feature_info.get())); @@ -537,7 +537,7 @@ TEST_F(QueryManagerTest, GetErrorQuery) { TestHelper::SetupFeatureInfoInitExpectations(gl_.get(), ""); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize("*"); + feature_info->Initialize(); scoped_ptr<QueryManager> manager( new QueryManager(decoder_.get(), feature_info.get())); diff --git a/gpu/command_buffer/service/texture_manager_unittest.cc b/gpu/command_buffer/service/texture_manager_unittest.cc index 402cc8d..483aaf2 100644 --- a/gpu/command_buffer/service/texture_manager_unittest.cc +++ b/gpu/command_buffer/service/texture_manager_unittest.cc @@ -318,7 +318,7 @@ TEST_F(TextureManagerTest, ValidForTargetNPOT) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_npot"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(NULL); + feature_info->Initialize(); TextureManager manager( NULL, feature_info.get(), kMaxTextureSize, kMaxCubeMapTextureSize); // Check NPOT width on level 0 @@ -356,7 +356,7 @@ class TextureTestBase : public testing::Test { if (!extensions.empty()) { TestHelper::SetupFeatureInfoInitExpectations(gl_.get(), extensions.c_str()); - feature_info_->Initialize(NULL); + feature_info_->Initialize(); } manager_.reset(new TextureManager( @@ -796,7 +796,7 @@ TEST_F(TextureTest, NPOT2DNPOTOK) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_npot"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(NULL); + feature_info->Initialize(); TextureManager manager( NULL, feature_info.get(), kMaxTextureSize, kMaxCubeMapTextureSize); manager.CreateTexture(kClient1Id, kService1Id); @@ -1087,7 +1087,7 @@ TEST_F(TextureTest, FloatNotLinear) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_float"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(NULL); + feature_info->Initialize(); TextureManager manager( NULL, feature_info.get(), kMaxTextureSize, kMaxCubeMapTextureSize); manager.CreateTexture(kClient1Id, kService1Id); @@ -1114,7 +1114,7 @@ TEST_F(TextureTest, FloatLinear) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_float GL_OES_texture_float_linear"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(NULL); + feature_info->Initialize(); TextureManager manager( NULL, feature_info.get(), kMaxTextureSize, kMaxCubeMapTextureSize); manager.CreateTexture(kClient1Id, kService1Id); @@ -1133,7 +1133,7 @@ TEST_F(TextureTest, HalfFloatNotLinear) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_half_float"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(NULL); + feature_info->Initialize(); TextureManager manager( NULL, feature_info.get(), kMaxTextureSize, kMaxCubeMapTextureSize); manager.CreateTexture(kClient1Id, kService1Id); @@ -1160,7 +1160,7 @@ TEST_F(TextureTest, HalfFloatLinear) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_texture_half_float GL_OES_texture_half_float_linear"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(NULL); + feature_info->Initialize(); TextureManager manager( NULL, feature_info.get(), kMaxTextureSize, kMaxCubeMapTextureSize); manager.CreateTexture(kClient1Id, kService1Id); @@ -1179,7 +1179,7 @@ TEST_F(TextureTest, EGLImageExternal) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_OES_EGL_image_external"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(NULL); + feature_info->Initialize(); TextureManager manager( NULL, feature_info.get(), kMaxTextureSize, kMaxCubeMapTextureSize); manager.CreateTexture(kClient1Id, kService1Id); @@ -1196,7 +1196,7 @@ TEST_F(TextureTest, DepthTexture) { TestHelper::SetupFeatureInfoInitExpectations( gl_.get(), "GL_ANGLE_depth_texture"); scoped_refptr<FeatureInfo> feature_info(new FeatureInfo()); - feature_info->Initialize(NULL); + feature_info->Initialize(); TextureManager manager( NULL, feature_info.get(), kMaxTextureSize, kMaxCubeMapTextureSize); manager.CreateTexture(kClient1Id, kService1Id); diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc index 82a01f0..4568c53 100644 --- a/gpu/command_buffer/tests/gl_manager.cc +++ b/gpu/command_buffer/tests/gl_manager.cc @@ -107,7 +107,6 @@ void GLManager::Initialize(const GLManager::Options& options) { share_group ? share_group : new gfx::GLShareGroup; gfx::GpuPreference gpu_preference(gfx::PreferDiscreteGpu); - const char* allowed_extensions = "*"; std::vector<int32> attribs; gles2::ContextCreationAttribHelper attrib_helper; attrib_helper.red_size_ = 8; @@ -172,7 +171,6 @@ void GLManager::Initialize(const GLManager::Options& options) { true, options.size, ::gpu::gles2::DisallowedFeatures(), - allowed_extensions, attribs)) << "could not initialize decoder"; command_buffer_->SetPutOffsetChangeCallback( diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc index 7de9e36..87bd809 100644 --- a/gpu/gles2_conform_support/egl/display.cc +++ b/gpu/gles2_conform_support/egl/display.cc @@ -165,7 +165,6 @@ EGLSurface Display::CreateWindowSurface(EGLConfig config, gl_surface_->IsOffscreen(), size, gpu::gles2::DisallowedFeatures(), - NULL, attribs)) { return EGL_NO_SURFACE; } |