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

Side by Side Diff: gpu/command_buffer/tests/gl_query_unittest.cc

Issue 240273006: Revert of gpu: Add CHROMIUM_sync_query extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/query_manager.cc ('k') | ui/gl/gl_bindings.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 #include <GLES2/gl2ext.h> 6 #include <GLES2/gl2ext.h>
7 #include <GLES2/gl2extchromium.h> 7 #include <GLES2/gl2extchromium.h>
8 8
9 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
10 #include "gpu/command_buffer/tests/gl_manager.h" 10 #include "gpu/command_buffer/tests/gl_manager.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 query_result = 0; 144 query_result = 0;
145 available = 0; 145 available = 0;
146 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT, &available); 146 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT, &available);
147 EXPECT_TRUE(available); 147 EXPECT_TRUE(available);
148 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_EXT, &query_result); 148 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_EXT, &query_result);
149 149
150 EXPECT_LE(query_result, kTimePrecisionMicroseconds); 150 EXPECT_LE(query_result, kTimePrecisionMicroseconds);
151 } 151 }
152 152
153 TEST_F(QueryTest, SyncQueryBasic) {
154 EXPECT_TRUE(GLTestHelper::HasExtension("GL_CHROMIUM_sync_query"));
155
156 GLuint query = 0;
157 glGenQueriesEXT(1, &query);
158
159 glBeginQueryEXT(GL_COMMANDS_COMPLETED_CHROMIUM, query);
160 glEndQueryEXT(GL_COMMANDS_COMPLETED_CHROMIUM);
161
162 glFinish();
163
164 GLuint available = 0;
165 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT, &available);
166 EXPECT_TRUE(available);
167 }
168
169 } // namespace gpu 153 } // namespace gpu
170 154
171 155
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/query_manager.cc ('k') | ui/gl/gl_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698