| Index: gpu/command_buffer/service/feature_info_unittest.cc
|
| diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc
|
| index 47a1999879fd51b7c02faf91c91d05ebd12bb688..bb616ac805b4041d3e6e31820aea1414b12d2cf4 100644
|
| --- a/gpu/command_buffer/service/feature_info_unittest.cc
|
| +++ b/gpu/command_buffer/service/feature_info_unittest.cc
|
| @@ -76,7 +76,7 @@ class FeatureInfoTest
|
| TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
|
| gl_.get(), extensions, renderer, version);
|
| info_ = new FeatureInfo();
|
| - info_->Initialize();
|
| + info_->InitializeForTesting();
|
| }
|
|
|
| void SetupInitExpectationsWithGLVersionAndCommandLine(
|
| @@ -88,7 +88,20 @@ class FeatureInfoTest
|
| TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
|
| gl_.get(), extensions, renderer, version);
|
| info_ = new FeatureInfo(command_line);
|
| - info_->Initialize();
|
| + info_->InitializeForTesting();
|
| + }
|
| +
|
| + void SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine(
|
| + const char* extensions,
|
| + const char* renderer,
|
| + const char* version,
|
| + ContextType context_type,
|
| + const base::CommandLine& command_line) {
|
| + GpuServiceTest::SetUpWithGLVersion(version, extensions);
|
| + TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
|
| + gl_.get(), extensions, renderer, version);
|
| + info_ = new FeatureInfo(command_line);
|
| + info_->Initialize(context_type, DisallowedFeatures());
|
| }
|
|
|
| void SetupWithCommandLine(const base::CommandLine& command_line) {
|
| @@ -103,7 +116,7 @@ class FeatureInfoTest
|
| TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
|
| gl_.get(), extensions, "", "");
|
| info_ = new FeatureInfo(command_line);
|
| - info_->Initialize();
|
| + info_->InitializeForTesting();
|
| }
|
|
|
| void SetupWithoutInit() {
|
| @@ -1369,5 +1382,29 @@ TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) {
|
| EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422);
|
| }
|
|
|
| +TEST_P(FeatureInfoTest, DisableMsaaOnNonWebGLContexts) {
|
| + base::CommandLine command_line(0, NULL);
|
| + command_line.AppendSwitchASCII(
|
| + switches::kGpuDriverBugWorkarounds,
|
| + base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS));
|
| + SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine(
|
| + "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample",
|
| + "", "", CONTEXT_TYPE_OPENGLES2, command_line);
|
| + EXPECT_FALSE(info_->feature_flags().multisampled_render_to_texture);
|
| + EXPECT_FALSE(info_->feature_flags().chromium_framebuffer_multisample);
|
| +}
|
| +
|
| +TEST_P(FeatureInfoTest, DontDisableMsaaOnWebGLContexts) {
|
| + base::CommandLine command_line(0, NULL);
|
| + command_line.AppendSwitchASCII(
|
| + switches::kGpuDriverBugWorkarounds,
|
| + base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS));
|
| + SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine(
|
| + "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample",
|
| + "", "", CONTEXT_TYPE_WEBGL1, command_line);
|
| + EXPECT_TRUE(info_->feature_flags().multisampled_render_to_texture);
|
| + EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample);
|
| +}
|
| +
|
| } // namespace gles2
|
| } // namespace gpu
|
|
|