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_switches.h" | 10 #include "gpu/command_buffer/service/gpu_switches.h" |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
985 base::IntToString(gpu::EXIT_ON_CONTEXT_LOST) + "," + | 985 base::IntToString(gpu::EXIT_ON_CONTEXT_LOST) + "," + |
986 base::IntToString(gpu::MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_1024) + "," + | 986 base::IntToString(gpu::MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_1024) + "," + |
987 base::IntToString(gpu::MAX_TEXTURE_SIZE_LIMIT_4096)); | 987 base::IntToString(gpu::MAX_TEXTURE_SIZE_LIMIT_4096)); |
988 // Workarounds should get parsed without the need for a context. | 988 // Workarounds should get parsed without the need for a context. |
989 SetupWithCommandLine(command_line); | 989 SetupWithCommandLine(command_line); |
990 EXPECT_TRUE(info_->workarounds().exit_on_context_lost); | 990 EXPECT_TRUE(info_->workarounds().exit_on_context_lost); |
991 EXPECT_EQ(1024, info_->workarounds().max_cube_map_texture_size); | 991 EXPECT_EQ(1024, info_->workarounds().max_cube_map_texture_size); |
992 EXPECT_EQ(4096, info_->workarounds().max_texture_size); | 992 EXPECT_EQ(4096, info_->workarounds().max_texture_size); |
993 } | 993 } |
994 | 994 |
995 TEST_F(FeatureInfoTest, InitializeCHROMIUM_NV_path_rendering) { | |
piman
2014/04/11 22:19:27
nit: InitializeCHROMIUM_path_rendering
Kimmo Kinnunen
2014/04/15 16:16:58
Done.
| |
996 SetupInitExpectationsWithGLVersion( | |
997 "GL_NV_path_rendering", "", "OpenGL 3.0"); | |
998 EXPECT_TRUE(info_->feature_flags().nv_path_rendering); | |
999 EXPECT_THAT(info_->extensions(), | |
1000 HasSubstr("GL_CHROMIUM_NV_path_rendering")); | |
1001 } | |
1002 | |
1003 TEST_F(FeatureInfoTest, InitializeNoCHROMIUM_NV_path_rendering) { | |
1004 SetupInitExpectationsWithGLVersion( | |
1005 "", "", "OpenGL 3.0"); | |
1006 EXPECT_FALSE(info_->feature_flags().nv_path_rendering); | |
1007 EXPECT_THAT(info_->extensions(), | |
1008 Not(HasSubstr("GL_CHROMIUM_NV_path_rendering"))); | |
1009 } | |
1010 | |
995 } // namespace gles2 | 1011 } // namespace gles2 |
996 } // namespace gpu | 1012 } // namespace gpu |
OLD | NEW |