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

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

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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 <memory> 9 #include <memory>
10 10
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 EXPECT_TRUE( 1305 EXPECT_TRUE(
1306 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_STENCIL)); 1306 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_STENCIL));
1307 EXPECT_TRUE(info_->validators()->texture_format.IsValid(GL_DEPTH_STENCIL)); 1307 EXPECT_TRUE(info_->validators()->texture_format.IsValid(GL_DEPTH_STENCIL));
1308 EXPECT_TRUE(info_->feature_flags().npot_ok); 1308 EXPECT_TRUE(info_->feature_flags().npot_ok);
1309 EXPECT_TRUE(info_->feature_flags().native_vertex_array_object); 1309 EXPECT_TRUE(info_->feature_flags().native_vertex_array_object);
1310 EXPECT_TRUE(info_->feature_flags().enable_samplers); 1310 EXPECT_TRUE(info_->feature_flags().enable_samplers);
1311 EXPECT_TRUE(info_->feature_flags().map_buffer_range); 1311 EXPECT_TRUE(info_->feature_flags().map_buffer_range);
1312 EXPECT_TRUE(info_->feature_flags().ext_discard_framebuffer); 1312 EXPECT_TRUE(info_->feature_flags().ext_discard_framebuffer);
1313 EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_discard_framebuffer")); 1313 EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_discard_framebuffer"));
1314 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); 1314 EXPECT_TRUE(info_->feature_flags().chromium_sync_query);
1315 EXPECT_TRUE(gfx::GLFence::IsSupported()); 1315 EXPECT_TRUE(gl::GLFence::IsSupported());
1316 } 1316 }
1317 1317
1318 TEST_P(FeatureInfoTest, InitializeWithoutSamplers) { 1318 TEST_P(FeatureInfoTest, InitializeWithoutSamplers) {
1319 SetupInitExpectationsWithGLVersion("", "", "3.0"); 1319 SetupInitExpectationsWithGLVersion("", "", "3.0");
1320 EXPECT_FALSE(info_->feature_flags().enable_samplers); 1320 EXPECT_FALSE(info_->feature_flags().enable_samplers);
1321 } 1321 }
1322 1322
1323 TEST_P(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) { 1323 TEST_P(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) {
1324 base::CommandLine command_line(0, NULL); 1324 base::CommandLine command_line(0, NULL);
1325 command_line.AppendSwitchASCII( 1325 command_line.AppendSwitchASCII(
(...skipping 14 matching lines...) Expand all
1340 // Workarounds should get parsed without the need for a context. 1340 // Workarounds should get parsed without the need for a context.
1341 SetupWithCommandLine(command_line); 1341 SetupWithCommandLine(command_line);
1342 EXPECT_TRUE(info_->workarounds().exit_on_context_lost); 1342 EXPECT_TRUE(info_->workarounds().exit_on_context_lost);
1343 EXPECT_EQ(1024, info_->workarounds().max_cube_map_texture_size); 1343 EXPECT_EQ(1024, info_->workarounds().max_cube_map_texture_size);
1344 EXPECT_EQ(4096, info_->workarounds().max_texture_size); 1344 EXPECT_EQ(4096, info_->workarounds().max_texture_size);
1345 } 1345 }
1346 1346
1347 TEST_P(FeatureInfoTest, InitializeWithARBSync) { 1347 TEST_P(FeatureInfoTest, InitializeWithARBSync) {
1348 SetupInitExpectations("GL_ARB_sync"); 1348 SetupInitExpectations("GL_ARB_sync");
1349 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); 1349 EXPECT_TRUE(info_->feature_flags().chromium_sync_query);
1350 EXPECT_TRUE(gfx::GLFence::IsSupported()); 1350 EXPECT_TRUE(gl::GLFence::IsSupported());
1351 } 1351 }
1352 1352
1353 TEST_P(FeatureInfoTest, InitializeWithNVFence) { 1353 TEST_P(FeatureInfoTest, InitializeWithNVFence) {
1354 SetupInitExpectations("GL_NV_fence"); 1354 SetupInitExpectations("GL_NV_fence");
1355 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); 1355 EXPECT_TRUE(info_->feature_flags().chromium_sync_query);
1356 EXPECT_TRUE(gfx::GLFence::IsSupported()); 1356 EXPECT_TRUE(gl::GLFence::IsSupported());
1357 } 1357 }
1358 1358
1359 TEST_P(FeatureInfoTest, InitializeWithNVDrawBuffers) { 1359 TEST_P(FeatureInfoTest, InitializeWithNVDrawBuffers) {
1360 SetupInitExpectationsWithGLVersion("GL_NV_draw_buffers", "", "OpenGL ES 3.0"); 1360 SetupInitExpectationsWithGLVersion("GL_NV_draw_buffers", "", "OpenGL ES 3.0");
1361 EXPECT_TRUE(info_->feature_flags().nv_draw_buffers); 1361 EXPECT_TRUE(info_->feature_flags().nv_draw_buffers);
1362 EXPECT_TRUE(info_->feature_flags().ext_draw_buffers); 1362 EXPECT_TRUE(info_->feature_flags().ext_draw_buffers);
1363 } 1363 }
1364 1364
1365 TEST_P(FeatureInfoTest, InitializeWithPreferredEXTDrawBuffers) { 1365 TEST_P(FeatureInfoTest, InitializeWithPreferredEXTDrawBuffers) {
1366 SetupInitExpectationsWithGLVersion( 1366 SetupInitExpectationsWithGLVersion(
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT)); 1491 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT));
1492 } 1492 }
1493 1493
1494 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) { 1494 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) {
1495 SetupInitExpectations("GL_APPLE_ycbcr_422"); 1495 SetupInitExpectations("GL_APPLE_ycbcr_422");
1496 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422); 1496 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422);
1497 } 1497 }
1498 1498
1499 } // namespace gles2 1499 } // namespace gles2
1500 } // namespace gpu 1500 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gl_context_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698