Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: gpu/command_buffer/service/feature_info_unittest.cc

Issue 1641623002: Revert of command_buffer: Enable gl path rendering by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 command_line.AppendSwitchASCII( 1265 command_line.AppendSwitchASCII(
1266 switches::kGpuDriverBugWorkarounds, 1266 switches::kGpuDriverBugWorkarounds,
1267 base::IntToString(gpu::DISABLE_BLEND_EQUATION_ADVANCED)); 1267 base::IntToString(gpu::DISABLE_BLEND_EQUATION_ADVANCED));
1268 SetupInitExpectationsWithCommandLine( 1268 SetupInitExpectationsWithCommandLine(
1269 "GL_KHR_blend_equation_advanced_coherent GL_KHR_blend_equation_advanced", 1269 "GL_KHR_blend_equation_advanced_coherent GL_KHR_blend_equation_advanced",
1270 command_line); 1270 command_line);
1271 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced); 1271 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced);
1272 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced_coherent); 1272 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced_coherent);
1273 } 1273 }
1274 1274
1275 TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering_no_cmdline_switch) {
1276 SetupInitExpectationsWithGLVersion(
1277 "GL_ARB_compatibility GL_NV_path_rendering GL_EXT_direct_state_access",
1278 "", "4.3");
1279 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering);
1280 EXPECT_THAT(info_->extensions(),
1281 Not(HasSubstr("GL_CHROMIUM_path_rendering")));
1282 }
1283
1275 TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering) { 1284 TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering) {
1276 base::CommandLine command_line(0, NULL); 1285 base::CommandLine command_line(0, NULL);
1286 command_line.AppendSwitch(switches::kEnableGLPathRendering);
1277 SetupInitExpectationsWithGLVersionAndCommandLine( 1287 SetupInitExpectationsWithGLVersionAndCommandLine(
1278 "GL_ARB_compatibility GL_NV_path_rendering GL_EXT_direct_state_access", 1288 "GL_ARB_compatibility GL_NV_path_rendering GL_EXT_direct_state_access",
1279 "", "4.3", command_line); 1289 "", "4.3", command_line);
1280 EXPECT_TRUE(info_->feature_flags().chromium_path_rendering); 1290 EXPECT_TRUE(info_->feature_flags().chromium_path_rendering);
1281 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering")); 1291 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering"));
1282 } 1292 }
1283 1293
1284 TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering2) { 1294 TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering2) {
1285 base::CommandLine command_line(0, NULL); 1295 base::CommandLine command_line(0, NULL);
1296 command_line.AppendSwitch(switches::kEnableGLPathRendering);
1286 SetupInitExpectationsWithGLVersionAndCommandLine( 1297 SetupInitExpectationsWithGLVersionAndCommandLine(
1287 "GL_NV_path_rendering", "", "OpenGL ES 3.1", command_line); 1298 "GL_NV_path_rendering", "", "OpenGL ES 3.1", command_line);
1288 EXPECT_TRUE(info_->feature_flags().chromium_path_rendering); 1299 EXPECT_TRUE(info_->feature_flags().chromium_path_rendering);
1289 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering")); 1300 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering"));
1290 } 1301 }
1291 1302
1292 TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering) { 1303 TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering) {
1293 base::CommandLine command_line(0, NULL); 1304 base::CommandLine command_line(0, NULL);
1305 command_line.AppendSwitch(switches::kEnableGLPathRendering);
1294 SetupInitExpectationsWithGLVersionAndCommandLine("GL_ARB_compatibility", "", 1306 SetupInitExpectationsWithGLVersionAndCommandLine("GL_ARB_compatibility", "",
1295 "4.3", command_line); 1307 "4.3", command_line);
1296 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering); 1308 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering);
1297 EXPECT_THAT(info_->extensions(), 1309 EXPECT_THAT(info_->extensions(),
1298 Not(HasSubstr("GL_CHROMIUM_path_rendering"))); 1310 Not(HasSubstr("GL_CHROMIUM_path_rendering")));
1299 } 1311 }
1300 1312
1301 TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering2) { 1313 TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering2) {
1302 base::CommandLine command_line(0, NULL); 1314 base::CommandLine command_line(0, NULL);
1315 command_line.AppendSwitch(switches::kEnableGLPathRendering);
1303 SetupInitExpectationsWithGLVersionAndCommandLine( 1316 SetupInitExpectationsWithGLVersionAndCommandLine(
1304 "GL_ARB_compatibility GL_NV_path_rendering", "", "4.3", command_line); 1317 "GL_ARB_compatibility GL_NV_path_rendering", "", "4.3", command_line);
1305 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering); 1318 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering);
1306 EXPECT_THAT(info_->extensions(), 1319 EXPECT_THAT(info_->extensions(),
1307 Not(HasSubstr("GL_CHROMIUM_path_rendering"))); 1320 Not(HasSubstr("GL_CHROMIUM_path_rendering")));
1308 } 1321 }
1309 1322
1310 TEST_P(FeatureInfoTest, InitializeNoKHR_blend_equation_advanced) { 1323 TEST_P(FeatureInfoTest, InitializeNoKHR_blend_equation_advanced) {
1311 SetupInitExpectationsWithGLVersion("GL_ARB_compatibility", "", "4.3"); 1324 SetupInitExpectationsWithGLVersion("GL_ARB_compatibility", "", "4.3");
1312 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced); 1325 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS)); 1407 base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS));
1395 SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine( 1408 SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine(
1396 "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample", 1409 "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample",
1397 "", "", CONTEXT_TYPE_WEBGL1, command_line); 1410 "", "", CONTEXT_TYPE_WEBGL1, command_line);
1398 EXPECT_TRUE(info_->feature_flags().multisampled_render_to_texture); 1411 EXPECT_TRUE(info_->feature_flags().multisampled_render_to_texture);
1399 EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample); 1412 EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample);
1400 } 1413 }
1401 1414
1402 } // namespace gles2 1415 } // namespace gles2
1403 } // namespace gpu 1416 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698