Chromium Code Reviews| 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 be3e38a6715b75c6f32b8d699ff555566562458b..46fc8211597fc1eff8106d1b8edd7c1f4c4e0f4c 100644 |
| --- a/gpu/command_buffer/service/feature_info_unittest.cc |
| +++ b/gpu/command_buffer/service/feature_info_unittest.cc |
| @@ -13,6 +13,7 @@ |
| #include "gpu/command_buffer/service/texture_manager.h" |
| #include "gpu/config/gpu_driver_bug_workaround_type.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| +#include "ui/gl/gl_fence.h" |
| #include "ui/gl/gl_implementation.h" |
| #include "ui/gl/gl_mock.h" |
| @@ -310,6 +311,7 @@ TEST_F(FeatureInfoTest, InitializeNoExtensions) { |
| GL_DEPTH24_STENCIL8_OES)); |
| EXPECT_FALSE(info_->validators()->equation.IsValid(GL_MIN_EXT)); |
| EXPECT_FALSE(info_->validators()->equation.IsValid(GL_MAX_EXT)); |
| + EXPECT_FALSE(info_->feature_flags().chromium_sync_query); |
| } |
| TEST_F(FeatureInfoTest, InitializeWithANGLE) { |
| @@ -1007,6 +1009,8 @@ TEST_F(FeatureInfoTest, InitializeWithES3) { |
| EXPECT_TRUE( |
| info_->validators()->texture_internal_format.IsValid(GL_DEPTH_STENCIL)); |
| EXPECT_TRUE(info_->validators()->texture_format.IsValid(GL_DEPTH_STENCIL)); |
| + EXPECT_TRUE(info_->feature_flags().chromium_sync_query); |
| + EXPECT_TRUE(gfx::GLFence::IsSupported()); |
| } |
| TEST_F(FeatureInfoTest, InitializeWithoutSamplers) { |
| @@ -1014,11 +1018,6 @@ TEST_F(FeatureInfoTest, InitializeWithoutSamplers) { |
| EXPECT_FALSE(info_->feature_flags().enable_samplers); |
| } |
| -TEST_F(FeatureInfoTest, InitializeWithES3AndFences) { |
| - SetupInitExpectationsWithGLVersion("EGL_KHR_fence_sync", "", "OpenGL ES 3.0"); |
| - EXPECT_TRUE(info_->feature_flags().use_async_readpixels); |
|
no sievers
2014/06/16 22:43:54
This test is bad. EGL_KHR_fence_sync is not a GL e
|
| -} |
| - |
| TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) { |
| CommandLine command_line(0, NULL); |
| command_line.AppendSwitchASCII( |
| @@ -1043,5 +1042,27 @@ TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsMultiple) { |
| EXPECT_EQ(4096, info_->workarounds().max_texture_size); |
| } |
| +TEST_F(FeatureInfoTest, InitializeWithARBSync) { |
| + SetupInitExpectations("GL_ARB_sync"); |
| + EXPECT_TRUE(info_->feature_flags().chromium_sync_query); |
| + EXPECT_TRUE(gfx::GLFence::IsSupported()); |
| +} |
| + |
| +TEST_F(FeatureInfoTest, InitializeWithNVFence) { |
| + SetupInitExpectations("GL_NV_fence"); |
| + EXPECT_TRUE(info_->feature_flags().chromium_sync_query); |
| + EXPECT_TRUE(gfx::GLFence::IsSupported()); |
| +} |
| + |
| +TEST_F(FeatureInfoTest, ARBSyncDisabled) { |
| + CommandLine command_line(0, NULL); |
| + command_line.AppendSwitchASCII( |
| + switches::kGpuDriverBugWorkarounds, |
| + base::IntToString(gpu::DISABLE_ARB_SYNC)); |
| + SetupInitExpectationsWithCommandLine("GL_ARB_sync", command_line); |
| + EXPECT_FALSE(info_->feature_flags().chromium_sync_query); |
| + EXPECT_FALSE(gfx::GLFence::IsSupported()); |
| +} |
| + |
| } // namespace gles2 |
| } // namespace gpu |