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

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

Issue 1626363002: command_buffer: Enable gl path rendering by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 command_line.AppendSwitchASCII( 1300 command_line.AppendSwitchASCII(
1301 switches::kGpuDriverBugWorkarounds, 1301 switches::kGpuDriverBugWorkarounds,
1302 base::IntToString(gpu::DISABLE_BLEND_EQUATION_ADVANCED)); 1302 base::IntToString(gpu::DISABLE_BLEND_EQUATION_ADVANCED));
1303 SetupInitExpectationsWithCommandLine( 1303 SetupInitExpectationsWithCommandLine(
1304 "GL_KHR_blend_equation_advanced_coherent GL_KHR_blend_equation_advanced", 1304 "GL_KHR_blend_equation_advanced_coherent GL_KHR_blend_equation_advanced",
1305 command_line); 1305 command_line);
1306 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced); 1306 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced);
1307 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced_coherent); 1307 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced_coherent);
1308 } 1308 }
1309 1309
1310 TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering_no_cmdline_switch) {
1311 SetupInitExpectationsWithGLVersion(
1312 "GL_ARB_compatibility GL_NV_path_rendering GL_EXT_direct_state_access",
1313 "", "4.3");
1314 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering);
1315 EXPECT_THAT(info_->extensions(),
1316 Not(HasSubstr("GL_CHROMIUM_path_rendering")));
1317 }
1318
1319 TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering) { 1310 TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering) {
1320 base::CommandLine command_line(0, NULL); 1311 base::CommandLine command_line(0, NULL);
1321 command_line.AppendSwitch(switches::kEnableGLPathRendering);
1322 SetupInitExpectationsWithGLVersionAndCommandLine( 1312 SetupInitExpectationsWithGLVersionAndCommandLine(
1323 "GL_ARB_compatibility GL_NV_path_rendering GL_EXT_direct_state_access " 1313 "GL_ARB_compatibility GL_NV_path_rendering GL_EXT_direct_state_access "
1324 "GL_NV_framebuffer_mixed_samples", 1314 "GL_NV_framebuffer_mixed_samples",
1325 "", "4.3", command_line); 1315 "", "4.3", command_line);
1326 EXPECT_TRUE(info_->feature_flags().chromium_path_rendering); 1316 EXPECT_TRUE(info_->feature_flags().chromium_path_rendering);
1327 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering")); 1317 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering"));
1328 } 1318 }
1329 1319
1330 TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering2) { 1320 TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering2) {
1331 base::CommandLine command_line(0, NULL); 1321 base::CommandLine command_line(0, NULL);
1332 command_line.AppendSwitch(switches::kEnableGLPathRendering);
1333 SetupInitExpectationsWithGLVersionAndCommandLine( 1322 SetupInitExpectationsWithGLVersionAndCommandLine(
1334 "GL_NV_path_rendering GL_NV_framebuffer_mixed_samples", "", 1323 "GL_NV_path_rendering GL_NV_framebuffer_mixed_samples", "",
1335 "OpenGL ES 3.1", command_line); 1324 "OpenGL ES 3.1", command_line);
1336 EXPECT_TRUE(info_->feature_flags().chromium_path_rendering); 1325 EXPECT_TRUE(info_->feature_flags().chromium_path_rendering);
1337 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering")); 1326 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering"));
1338 } 1327 }
1339 1328
1340 TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering) { 1329 TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering) {
1341 base::CommandLine command_line(0, NULL); 1330 base::CommandLine command_line(0, NULL);
1342 command_line.AppendSwitch(switches::kEnableGLPathRendering);
1343 SetupInitExpectationsWithGLVersionAndCommandLine("GL_ARB_compatibility", "", 1331 SetupInitExpectationsWithGLVersionAndCommandLine("GL_ARB_compatibility", "",
1344 "4.3", command_line); 1332 "4.3", command_line);
1345 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering); 1333 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering);
1346 EXPECT_THAT(info_->extensions(), 1334 EXPECT_THAT(info_->extensions(),
1347 Not(HasSubstr("GL_CHROMIUM_path_rendering"))); 1335 Not(HasSubstr("GL_CHROMIUM_path_rendering")));
1348 } 1336 }
1349 1337
1350 TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering2) { 1338 TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering2) {
1351 base::CommandLine command_line(0, NULL); 1339 base::CommandLine command_line(0, NULL);
1352 command_line.AppendSwitch(switches::kEnableGLPathRendering);
1353 SetupInitExpectationsWithGLVersionAndCommandLine( 1340 SetupInitExpectationsWithGLVersionAndCommandLine(
1354 "GL_ARB_compatibility GL_NV_path_rendering", "", "4.3", command_line); 1341 "GL_ARB_compatibility GL_NV_path_rendering", "", "4.3", command_line);
1355 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering); 1342 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering);
1356 EXPECT_THAT(info_->extensions(), 1343 EXPECT_THAT(info_->extensions(),
1357 Not(HasSubstr("GL_CHROMIUM_path_rendering"))); 1344 Not(HasSubstr("GL_CHROMIUM_path_rendering")));
1358 } 1345 }
1359 1346
1360 TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering3) { 1347 TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering3) {
1361 base::CommandLine command_line(0, NULL); 1348 base::CommandLine command_line(0, NULL);
1362 command_line.AppendSwitch(switches::kEnableGLPathRendering);
1363 // Missing framebuffer mixed samples. 1349 // Missing framebuffer mixed samples.
1364 SetupInitExpectationsWithGLVersionAndCommandLine( 1350 SetupInitExpectationsWithGLVersionAndCommandLine(
1365 "GL_NV_path_rendering", "", "OpenGL ES 3.1", command_line); 1351 "GL_NV_path_rendering", "", "OpenGL ES 3.1", command_line);
1366 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering); 1352 EXPECT_FALSE(info_->feature_flags().chromium_path_rendering);
1367 EXPECT_THAT(info_->extensions(), 1353 EXPECT_THAT(info_->extensions(),
1368 Not(HasSubstr("GL_CHROMIUM_path_rendering"))); 1354 Not(HasSubstr("GL_CHROMIUM_path_rendering")));
1369 } 1355 }
1370 1356
1371 TEST_P(FeatureInfoTest, InitializeNoKHR_blend_equation_advanced) { 1357 TEST_P(FeatureInfoTest, InitializeNoKHR_blend_equation_advanced) {
1372 SetupInitExpectationsWithGLVersion("GL_ARB_compatibility", "", "4.3"); 1358 SetupInitExpectationsWithGLVersion("GL_ARB_compatibility", "", "4.3");
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS)); 1441 base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS));
1456 SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine( 1442 SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine(
1457 "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample", 1443 "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample",
1458 "", "", CONTEXT_TYPE_WEBGL1, command_line); 1444 "", "", CONTEXT_TYPE_WEBGL1, command_line);
1459 EXPECT_TRUE(info_->feature_flags().multisampled_render_to_texture); 1445 EXPECT_TRUE(info_->feature_flags().multisampled_render_to_texture);
1460 EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample); 1446 EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample);
1461 } 1447 }
1462 1448
1463 } // namespace gles2 1449 } // namespace gles2
1464 } // namespace gpu 1450 } // 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