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