OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "gpu/command_buffer/common/gl_mock.h" | 8 #include "gpu/command_buffer/common/gl_mock.h" |
9 #include "gpu/command_buffer/service/test_helper.h" | 9 #include "gpu/command_buffer/service/test_helper.h" |
10 #include "gpu/command_buffer/service/texture_manager.h" | 10 #include "gpu/command_buffer/service/texture_manager.h" |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 info_.Initialize(NULL); | 279 info_.Initialize(NULL); |
280 EXPECT_TRUE(info_.feature_flags().chromium_framebuffer_multisample); | 280 EXPECT_TRUE(info_.feature_flags().chromium_framebuffer_multisample); |
281 EXPECT_THAT(info_.extensions(), | 281 EXPECT_THAT(info_.extensions(), |
282 HasSubstr("GL_CHROMIUM_framebuffer_multisample")); | 282 HasSubstr("GL_CHROMIUM_framebuffer_multisample")); |
283 EXPECT_TRUE(info_.validators()->frame_buffer_target.IsValid( | 283 EXPECT_TRUE(info_.validators()->frame_buffer_target.IsValid( |
284 GL_READ_FRAMEBUFFER_EXT)); | 284 GL_READ_FRAMEBUFFER_EXT)); |
285 EXPECT_TRUE(info_.validators()->frame_buffer_target.IsValid( | 285 EXPECT_TRUE(info_.validators()->frame_buffer_target.IsValid( |
286 GL_DRAW_FRAMEBUFFER_EXT)); | 286 GL_DRAW_FRAMEBUFFER_EXT)); |
287 EXPECT_TRUE(info_.validators()->g_l_state.IsValid( | 287 EXPECT_TRUE(info_.validators()->g_l_state.IsValid( |
288 GL_READ_FRAMEBUFFER_BINDING_EXT)); | 288 GL_READ_FRAMEBUFFER_BINDING_EXT)); |
| 289 EXPECT_TRUE(info_.validators()->g_l_state.IsValid( |
| 290 GL_MAX_SAMPLES_EXT)); |
289 EXPECT_TRUE(info_.validators()->render_buffer_parameter.IsValid( | 291 EXPECT_TRUE(info_.validators()->render_buffer_parameter.IsValid( |
290 GL_MAX_SAMPLES_EXT)); | 292 GL_RENDERBUFFER_SAMPLES_EXT)); |
291 } | 293 } |
292 | 294 |
293 TEST_F(FeatureInfoTest, InitializeEXT_texture_filter_anisotropic) { | 295 TEST_F(FeatureInfoTest, InitializeEXT_texture_filter_anisotropic) { |
294 SetupInitExpectations("GL_EXT_texture_filter_anisotropic"); | 296 SetupInitExpectations("GL_EXT_texture_filter_anisotropic"); |
295 info_.Initialize(NULL); | 297 info_.Initialize(NULL); |
296 EXPECT_THAT(info_.extensions(), | 298 EXPECT_THAT(info_.extensions(), |
297 HasSubstr("GL_EXT_texture_filter_anisotropic")); | 299 HasSubstr("GL_EXT_texture_filter_anisotropic")); |
298 EXPECT_TRUE(info_.validators()->texture_parameter.IsValid( | 300 EXPECT_TRUE(info_.validators()->texture_parameter.IsValid( |
299 GL_TEXTURE_MAX_ANISOTROPY_EXT)); | 301 GL_TEXTURE_MAX_ANISOTROPY_EXT)); |
300 EXPECT_TRUE(info_.validators()->g_l_state.IsValid( | 302 EXPECT_TRUE(info_.validators()->g_l_state.IsValid( |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES)); | 390 GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES)); |
389 } | 391 } |
390 | 392 |
391 TEST_F(FeatureInfoTest, InitializeCHROMIUM_webglsl) { | 393 TEST_F(FeatureInfoTest, InitializeCHROMIUM_webglsl) { |
392 SetupInitExpectations(""); | 394 SetupInitExpectations(""); |
393 info_.Initialize("GL_CHROMIUM_webglsl"); | 395 info_.Initialize("GL_CHROMIUM_webglsl"); |
394 EXPECT_THAT(info_.extensions(), HasSubstr("GL_CHROMIUM_webglsl")); | 396 EXPECT_THAT(info_.extensions(), HasSubstr("GL_CHROMIUM_webglsl")); |
395 EXPECT_TRUE(info_.feature_flags().chromium_webglsl); | 397 EXPECT_TRUE(info_.feature_flags().chromium_webglsl); |
396 } | 398 } |
397 | 399 |
| 400 TEST_F(FeatureInfoTest, InitializeOES_rgb8_rgba8) { |
| 401 SetupInitExpectations("GL_OES_rgb8_rgba8"); |
| 402 info_.Initialize(NULL); |
| 403 EXPECT_THAT(info_.extensions(), |
| 404 HasSubstr("GL_OES_rgb8_rgba8")); |
| 405 EXPECT_TRUE(info_.validators()->render_buffer_format.IsValid( |
| 406 GL_RGB8_OES)); |
| 407 EXPECT_TRUE(info_.validators()->render_buffer_format.IsValid( |
| 408 GL_RGBA8_OES)); |
| 409 } |
| 410 |
398 } // namespace gles2 | 411 } // namespace gles2 |
399 } // namespace gpu | 412 } // namespace gpu |
400 | 413 |
401 | 414 |
402 | 415 |
OLD | NEW |