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

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

Issue 228653004: Reduce the number of flushes while using glQueries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comment. Created 6 years, 8 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
« no previous file with comments | « AUTHORS ('k') | gpu/command_buffer/client/query_tracker.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) 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 <limits> 9 #include <limits>
10 10
(...skipping 2978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2989 // Test GetQueryObjectuivEXT fails if bad id 2989 // Test GetQueryObjectuivEXT fails if bad id
2990 ClearCommands(); 2990 ClearCommands();
2991 gl_->GetQueryObjectuivEXT(4567, GL_QUERY_RESULT_AVAILABLE_EXT, &available); 2991 gl_->GetQueryObjectuivEXT(4567, GL_QUERY_RESULT_AVAILABLE_EXT, &available);
2992 EXPECT_TRUE(NoCommandsWritten()); 2992 EXPECT_TRUE(NoCommandsWritten());
2993 EXPECT_EQ(0xBDu, available); 2993 EXPECT_EQ(0xBDu, available);
2994 EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); 2994 EXPECT_EQ(GL_INVALID_OPERATION, CheckError());
2995 2995
2996 // Test GetQueryObjectuivEXT CheckResultsAvailable 2996 // Test GetQueryObjectuivEXT CheckResultsAvailable
2997 ClearCommands(); 2997 ClearCommands();
2998 gl_->GetQueryObjectuivEXT(id1, GL_QUERY_RESULT_AVAILABLE_EXT, &available); 2998 gl_->GetQueryObjectuivEXT(id1, GL_QUERY_RESULT_AVAILABLE_EXT, &available);
2999 EXPECT_TRUE(NoCommandsWritten());
3000 EXPECT_EQ(0u, available); 2999 EXPECT_EQ(0u, available);
3001 } 3000 }
3002 3001
3003 TEST_F(GLES2ImplementationTest, ErrorQuery) { 3002 TEST_F(GLES2ImplementationTest, ErrorQuery) {
3004 GLuint id = 0; 3003 GLuint id = 0;
3005 gl_->GenQueriesEXT(1, &id); 3004 gl_->GenQueriesEXT(1, &id);
3006 ClearCommands(); 3005 ClearCommands();
3007 3006
3008 // Test BeginQueryEXT does NOT insert commands. 3007 // Test BeginQueryEXT does NOT insert commands.
3009 gl_->BeginQueryEXT(GL_GET_ERROR_QUERY_CHROMIUM, id); 3008 gl_->BeginQueryEXT(GL_GET_ERROR_QUERY_CHROMIUM, id);
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
3183 ContextInitOptions init_options; 3182 ContextInitOptions init_options;
3184 init_options.bind_generates_resource_client = true; 3183 init_options.bind_generates_resource_client = true;
3185 init_options.bind_generates_resource_service = false; 3184 init_options.bind_generates_resource_service = false;
3186 EXPECT_FALSE(Initialize(init_options)); 3185 EXPECT_FALSE(Initialize(init_options));
3187 } 3186 }
3188 3187
3189 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" 3188 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h"
3190 3189
3191 } // namespace gles2 3190 } // namespace gles2
3192 } // namespace gpu 3191 } // namespace gpu
OLDNEW
« no previous file with comments | « AUTHORS ('k') | gpu/command_buffer/client/query_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698