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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "gpu/command_buffer/service/gpu_service_test.h" | 10 #include "gpu/command_buffer/service/gpu_service_test.h" |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 TEST_F(FeatureInfoTest, ARBSyncDisabled) { | 1065 TEST_F(FeatureInfoTest, ARBSyncDisabled) { |
1066 CommandLine command_line(0, NULL); | 1066 CommandLine command_line(0, NULL); |
1067 command_line.AppendSwitchASCII( | 1067 command_line.AppendSwitchASCII( |
1068 switches::kGpuDriverBugWorkarounds, | 1068 switches::kGpuDriverBugWorkarounds, |
1069 base::IntToString(gpu::DISABLE_ARB_SYNC)); | 1069 base::IntToString(gpu::DISABLE_ARB_SYNC)); |
1070 SetupInitExpectationsWithCommandLine("GL_ARB_sync", command_line); | 1070 SetupInitExpectationsWithCommandLine("GL_ARB_sync", command_line); |
1071 EXPECT_FALSE(info_->feature_flags().chromium_sync_query); | 1071 EXPECT_FALSE(info_->feature_flags().chromium_sync_query); |
1072 EXPECT_FALSE(gfx::GLFence::IsSupported()); | 1072 EXPECT_FALSE(gfx::GLFence::IsSupported()); |
1073 } | 1073 } |
1074 | 1074 |
| 1075 TEST_F(FeatureInfoTest, InitializeCHROMIUM_path_rendering) { |
| 1076 SetupInitExpectationsWithGLVersion( |
| 1077 "GL_NV_path_rendering GL_EXT_direct_state_access", "", "4.3"); |
| 1078 EXPECT_TRUE(info_->feature_flags().chromium_path_rendering); |
| 1079 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering")); |
| 1080 } |
| 1081 |
| 1082 TEST_F(FeatureInfoTest, InitializeCHROMIUM_path_rendering2) { |
| 1083 SetupInitExpectationsWithGLVersion( |
| 1084 "GL_NV_path_rendering", "", "OpenGL ES 3.1"); |
| 1085 EXPECT_TRUE(info_->feature_flags().chromium_path_rendering); |
| 1086 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering")); |
| 1087 } |
| 1088 |
| 1089 TEST_F(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering) { |
| 1090 SetupInitExpectationsWithGLVersion("", "", "4.3"); |
| 1091 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering); |
| 1092 EXPECT_THAT(info_->extensions(), |
| 1093 Not(HasSubstr("GL_CHROMIUM_path_rendering"))); |
| 1094 } |
| 1095 |
| 1096 TEST_F(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering2) { |
| 1097 SetupInitExpectationsWithGLVersion("GL_NV_path_rendering", "", "4.3"); |
| 1098 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering); |
| 1099 EXPECT_THAT(info_->extensions(), |
| 1100 Not(HasSubstr("GL_CHROMIUM_path_rendering"))); |
| 1101 } |
| 1102 |
1075 } // namespace gles2 | 1103 } // namespace gles2 |
1076 } // namespace gpu | 1104 } // namespace gpu |
OLD | NEW |