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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest.cc

Issue 10782005: Add a shallow command buffer flush that doesn't glFlush (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes a test failure Created 8 years, 5 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
OLDNEW
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 // Tests for GLES2Implementation. 5 // Tests for GLES2Implementation.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2ext.h> 9 #include <GLES2/gl2ext.h>
10 #include "gpu/command_buffer/client/client_test_helper.h" 10 #include "gpu/command_buffer/client/client_test_helper.h"
(...skipping 2283 matching lines...) Expand 10 before | Expand all | Expand 10 after
2294 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), gl_->GetError()); 2294 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), gl_->GetError());
2295 } 2295 }
2296 2296
2297 TEST_F(GLES2ImplementationTest, GetString) { 2297 TEST_F(GLES2ImplementationTest, GetString) {
2298 const uint32 kBucketId = GLES2Implementation::kResultBucketId; 2298 const uint32 kBucketId = GLES2Implementation::kResultBucketId;
2299 const Str7 kString = {"foobar"}; 2299 const Str7 kString = {"foobar"};
2300 // GL_CHROMIUM_map_sub GL_CHROMIUM_flipy are hard coded into 2300 // GL_CHROMIUM_map_sub GL_CHROMIUM_flipy are hard coded into
2301 // GLES2Implementation. 2301 // GLES2Implementation.
2302 const char* expected_str = 2302 const char* expected_str =
2303 "foobar " 2303 "foobar "
2304 "GL_CHROMIUM_flipy "
2304 "GL_CHROMIUM_map_sub " 2305 "GL_CHROMIUM_map_sub "
2305 "GL_CHROMIUM_flipy " 2306 "GL_CHROMIUM_shallow_flush "
2306 "GL_EXT_unpack_subimage"; 2307 "GL_EXT_unpack_subimage";
2307 const char kBad = 0x12; 2308 const char kBad = 0x12;
2308 struct Cmds { 2309 struct Cmds {
2309 cmd::SetBucketSize set_bucket_size1; 2310 cmd::SetBucketSize set_bucket_size1;
2310 GetString get_string; 2311 GetString get_string;
2311 cmd::GetBucketStart get_bucket_start; 2312 cmd::GetBucketStart get_bucket_start;
2312 cmd::SetToken set_token1; 2313 cmd::SetToken set_token1;
2313 cmd::SetBucketSize set_bucket_size2; 2314 cmd::SetBucketSize set_bucket_size2;
2314 }; 2315 };
2315 ExpectedMemoryInfo mem1 = GetExpectedMemory(MaxTransferBufferSize()); 2316 ExpectedMemoryInfo mem1 = GetExpectedMemory(MaxTransferBufferSize());
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
2616 gl_->GetQueryObjectuivEXT(id, GL_QUERY_RESULT_EXT, &result); 2617 gl_->GetQueryObjectuivEXT(id, GL_QUERY_RESULT_EXT, &result);
2617 EXPECT_TRUE(NoCommandsWritten()); 2618 EXPECT_TRUE(NoCommandsWritten());
2618 EXPECT_EQ(static_cast<GLuint>(GL_INVALID_ENUM), result); 2619 EXPECT_EQ(static_cast<GLuint>(GL_INVALID_ENUM), result);
2619 } 2620 }
2620 2621
2621 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" 2622 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h"
2622 2623
2623 } // namespace gles2 2624 } // namespace gles2
2624 } // namespace gpu 2625 } // namespace gpu
2625 2626
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_autogen.h ('k') | gpu/command_buffer/cmd_buffer_functions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698