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

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

Issue 6268016: Fix GL_CHROMIUM_framebuffer_multisample to accept the correct enums.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gl_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gl_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698