OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/command_buffer/service/feature_info.h" | 5 #include "gpu/command_buffer/service/feature_info.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1419 EXPECT_TRUE(info_->validators()->read_pixel_format.IsValid(GL_RG_EXT)); | 1419 EXPECT_TRUE(info_->validators()->read_pixel_format.IsValid(GL_RG_EXT)); |
1420 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_R8_EXT)); | 1420 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_R8_EXT)); |
1421 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT)); | 1421 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT)); |
1422 } | 1422 } |
1423 | 1423 |
1424 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) { | 1424 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) { |
1425 SetupInitExpectations("GL_APPLE_ycbcr_422"); | 1425 SetupInitExpectations("GL_APPLE_ycbcr_422"); |
1426 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422); | 1426 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422); |
1427 } | 1427 } |
1428 | 1428 |
1429 TEST_P(FeatureInfoTest, DisableMsaaOnNonWebGLContexts) { | 1429 TEST_P(FeatureInfoTest, DisableMsaaOnInternalContexts) { |
1430 base::CommandLine command_line(0, NULL); | 1430 base::CommandLine command_line(0, NULL); |
1431 command_line.AppendSwitchASCII( | 1431 command_line.AppendSwitchASCII( |
1432 switches::kGpuDriverBugWorkarounds, | 1432 switches::kGpuDriverBugWorkarounds, |
1433 base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS)); | 1433 base::IntToString(gpu::DISABLE_MSAA_ON_INTERNAL_CONTEXTS)); |
1434 SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine( | 1434 SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine( |
1435 "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample", | 1435 "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample", |
1436 "", "", CONTEXT_TYPE_OPENGLES2, command_line); | 1436 "", "", CONTEXT_TYPE_OPENGLES2, command_line); |
1437 EXPECT_FALSE(info_->feature_flags().multisampled_render_to_texture); | 1437 EXPECT_FALSE(info_->feature_flags().multisampled_render_to_texture); |
1438 EXPECT_FALSE(info_->feature_flags().chromium_framebuffer_multisample); | 1438 EXPECT_FALSE(info_->feature_flags().chromium_framebuffer_multisample); |
1439 } | 1439 } |
1440 | 1440 |
1441 TEST_P(FeatureInfoTest, DontDisableMsaaOnWebGLContexts) { | 1441 TEST_P(FeatureInfoTest, DontDisableMsaaOnWebGLContexts) { |
1442 base::CommandLine command_line(0, NULL); | 1442 base::CommandLine command_line(0, NULL); |
1443 command_line.AppendSwitchASCII( | 1443 command_line.AppendSwitchASCII( |
1444 switches::kGpuDriverBugWorkarounds, | 1444 switches::kGpuDriverBugWorkarounds, |
1445 base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS)); | 1445 base::IntToString(gpu::DISABLE_MSAA_ON_INTERNAL_CONTEXTS)); |
1446 SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine( | 1446 SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine( |
1447 "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample", | 1447 "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample", |
1448 "", "", CONTEXT_TYPE_WEBGL1, command_line); | 1448 "", "", CONTEXT_TYPE_WEBGL1, command_line); |
1449 EXPECT_TRUE(info_->feature_flags().multisampled_render_to_texture); | 1449 EXPECT_TRUE(info_->feature_flags().multisampled_render_to_texture); |
1450 EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample); | 1450 EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample); |
1451 } | 1451 } |
1452 | 1452 |
| 1453 TEST_P(FeatureInfoTest, DontDisableMsaaOnPepperContexts) { |
| 1454 base::CommandLine command_line(0, NULL); |
| 1455 command_line.AppendSwitchASCII( |
| 1456 switches::kGpuDriverBugWorkarounds, |
| 1457 base::IntToString(gpu::DISABLE_MSAA_ON_INTERNAL_CONTEXTS)); |
| 1458 SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine( |
| 1459 "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample", |
| 1460 "", "", CONTEXT_TYPE_OPENGLES2_PEPPER, command_line); |
| 1461 EXPECT_TRUE(info_->feature_flags().multisampled_render_to_texture); |
| 1462 EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample); |
| 1463 } |
| 1464 |
1453 } // namespace gles2 | 1465 } // namespace gles2 |
1454 } // namespace gpu | 1466 } // namespace gpu |
OLD | NEW |