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

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

Issue 11267032: Fix latency test on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « no previous file | no next file » | 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 #include <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 #include <GLES2/gl2ext.h> 6 #include <GLES2/gl2ext.h>
7 7
8 #include "base/threading/platform_thread.h" 8 #include "base/threading/platform_thread.h"
9 #include "gpu/command_buffer/tests/gl_manager.h" 9 #include "gpu/command_buffer/tests/gl_manager.h"
10 #include "gpu/command_buffer/tests/gl_test_utils.h" 10 #include "gpu/command_buffer/tests/gl_test_utils.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 glFinish(); 42 glFinish();
43 43
44 query_status = 0; 44 query_status = 0;
45 result = 0; 45 result = 0;
46 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT, &result); 46 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT, &result);
47 EXPECT_TRUE(result); 47 EXPECT_TRUE(result);
48 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_EXT, &query_status); 48 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_EXT, &query_status);
49 EXPECT_EQ(static_cast<uint32>(GL_INVALID_ENUM), query_status); 49 EXPECT_EQ(static_cast<uint32>(GL_INVALID_ENUM), query_status);
50 } 50 }
51 51
52 TEST_F(QueryTest, LatencyQueryBasic) { 52 TEST_F(QueryTest, DISABLED_LatencyQueryBasic) {
53 EXPECT_TRUE(GLTestHelper::HasExtension( 53 EXPECT_TRUE(GLTestHelper::HasExtension(
54 "GL_CHROMIUM_command_buffer_latency_query")); 54 "GL_CHROMIUM_command_buffer_latency_query"));
55 55
56 GLuint query = 0; 56 GLuint query = 0;
57 glGenQueriesEXT(1, &query); 57 glGenQueriesEXT(1, &query);
58 58
59 GLuint query_result = 0; 59 GLuint query_result = 0;
60 GLuint available = 0; 60 GLuint available = 0;
61 61
62 // First test a query with a ~1ms "latency". 62 // First test a query with a ~1ms "latency".
(...skipping 30 matching lines...) Expand all
93 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT, &available); 93 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT, &available);
94 EXPECT_TRUE(available); 94 EXPECT_TRUE(available);
95 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_EXT, &query_result); 95 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_EXT, &query_result);
96 96
97 EXPECT_LE(query_result, kTimePrecisionMicroseconds); 97 EXPECT_LE(query_result, kTimePrecisionMicroseconds);
98 } 98 }
99 99
100 } // namespace gpu 100 } // namespace gpu
101 101
102 102
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698