| 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 <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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 GL_SRGB_ALPHA_EXT)); | 315 GL_SRGB_ALPHA_EXT)); |
| 316 EXPECT_FALSE(info_->validators()->texture_internal_format.IsValid( | 316 EXPECT_FALSE(info_->validators()->texture_internal_format.IsValid( |
| 317 GL_SRGB_EXT)); | 317 GL_SRGB_EXT)); |
| 318 EXPECT_FALSE(info_->validators()->texture_internal_format.IsValid( | 318 EXPECT_FALSE(info_->validators()->texture_internal_format.IsValid( |
| 319 GL_SRGB_ALPHA_EXT)); | 319 GL_SRGB_ALPHA_EXT)); |
| 320 EXPECT_FALSE(info_->validators()->render_buffer_format.IsValid( | 320 EXPECT_FALSE(info_->validators()->render_buffer_format.IsValid( |
| 321 GL_SRGB8_ALPHA8_EXT)); | 321 GL_SRGB8_ALPHA8_EXT)); |
| 322 EXPECT_FALSE(info_->validators()->frame_buffer_parameter.IsValid( | 322 EXPECT_FALSE(info_->validators()->frame_buffer_parameter.IsValid( |
| 323 GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT)); | 323 GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT)); |
| 324 EXPECT_FALSE(info_->feature_flags().chromium_image_ycbcr_422); | 324 EXPECT_FALSE(info_->feature_flags().chromium_image_ycbcr_422); |
| 325 EXPECT_TRUE(info_->validators()->pixel_store.IsValid(GL_UNPACK_ROW_LENGTH)); | |
| 326 EXPECT_TRUE(info_->validators()->pixel_store.IsValid(GL_UNPACK_SKIP_ROWS)); | |
| 327 EXPECT_TRUE(info_->validators()->pixel_store.IsValid(GL_UNPACK_SKIP_PIXELS)); | |
| 328 } | 325 } |
| 329 | 326 |
| 330 TEST_P(FeatureInfoTest, InitializeWithANGLE) { | 327 TEST_P(FeatureInfoTest, InitializeWithANGLE) { |
| 331 SetupInitExpectationsWithGLVersion("", kGLRendererStringANGLE, ""); | 328 SetupInitExpectationsWithGLVersion("", kGLRendererStringANGLE, ""); |
| 332 EXPECT_TRUE(info_->gl_version_info().is_angle); | 329 EXPECT_TRUE(info_->gl_version_info().is_angle); |
| 333 } | 330 } |
| 334 | 331 |
| 335 TEST_P(FeatureInfoTest, InitializeNPOTExtensionGLES) { | 332 TEST_P(FeatureInfoTest, InitializeNPOTExtensionGLES) { |
| 336 SetupInitExpectations("GL_OES_texture_npot"); | 333 SetupInitExpectations("GL_OES_texture_npot"); |
| 337 EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_npot")); | 334 EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_npot")); |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1441 base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS)); | 1438 base::IntToString(gpu::DISABLE_MSAA_ON_NON_WEBGL_CONTEXTS)); |
| 1442 SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine( | 1439 SetupInitExpectationsWithGLVersionAndContextTypeAndCommandLine( |
| 1443 "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample", | 1440 "GL_EXT_multisampled_render_to_texture GL_EXT_framebuffer_multisample", |
| 1444 "", "", CONTEXT_TYPE_WEBGL1, command_line); | 1441 "", "", CONTEXT_TYPE_WEBGL1, command_line); |
| 1445 EXPECT_TRUE(info_->feature_flags().multisampled_render_to_texture); | 1442 EXPECT_TRUE(info_->feature_flags().multisampled_render_to_texture); |
| 1446 EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample); | 1443 EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample); |
| 1447 } | 1444 } |
| 1448 | 1445 |
| 1449 } // namespace gles2 | 1446 } // namespace gles2 |
| 1450 } // namespace gpu | 1447 } // namespace gpu |
| OLD | NEW |