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

Side by Side Diff: client/deps/glbench/src/teartest.cc

Issue 2122020: Fixes for GLES systems. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: ...and removed bogus #-I from Makefile Created 10 years, 7 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 | « client/deps/glbench/src/teartest.h ('k') | client/deps/glbench/src/testbase.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 OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 <gflags/gflags.h> 5 #include <gflags/gflags.h>
6 #include <map> 6 #include <map>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <time.h> 10 #include <time.h>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 glEnableVertexAttribArray(attribute_index); 197 glEnableVertexAttribArray(attribute_index);
198 198
199 int texture_sampler = glGetUniformLocation(program, "tex"); 199 int texture_sampler = glGetUniformLocation(program, "tex");
200 glUniform1f(texture_sampler, 0); 200 glUniform1f(texture_sampler, 0);
201 201
202 // UniformTest needs a uniform from the shader program. Get the uniform 202 // UniformTest needs a uniform from the shader program. Get the uniform
203 // and instantiate the test. 203 // and instantiate the test.
204 Test* uniform_test = GetUniformTest(glGetUniformLocation(program, "shift")); 204 Test* uniform_test = GetUniformTest(glGetUniformLocation(program, "shift"));
205 test_map["uniform"] = uniform_test; 205 test_map["uniform"] = uniform_test;
206 test_map["teximage2d"] = GetTexImage2DTest(); 206 test_map["teximage2d"] = GetTexImage2DTest();
207 #ifdef USE_EGL 207 #if defined(USE_OPENGLES)
208 test_map["pixmap_to_texture"] = GetPixmapToTextureTestEGL(); 208 test_map["pixmap_to_texture"] = GetPixmapToTextureTestEGL();
209 #else 209 #elif defined(USE_OPENGL)
210 test_map["pixmap_to_texture"] = GetPixmapToTextureTest(); 210 test_map["pixmap_to_texture"] = GetPixmapToTextureTest();
211 #endif 211 #endif
212 212
213 SwapInterval(sleep_duration ? 0 : 1); 213 SwapInterval(sleep_duration ? 0 : 1);
214 214
215 std::vector<std::string> tests; 215 std::vector<std::string> tests;
216 SplitString(FLAGS_tests, ',', &tests); 216 SplitString(FLAGS_tests, ',', &tests);
217 217
218 int return_code = 0; 218 int return_code = 0;
219 for (std::vector<std::string>::iterator it = tests.begin(); 219 for (std::vector<std::string>::iterator it = tests.begin();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 t->Stop(); 252 t->Stop();
253 } 253 }
254 254
255 // TODO: cleaner teardown. 255 // TODO: cleaner teardown.
256 256
257 glDeleteTextures(1, &texture); 257 glDeleteTextures(1, &texture);
258 DestroyContext(); 258 DestroyContext();
259 return return_code; 259 return return_code;
260 } 260 }
OLDNEW
« no previous file with comments | « client/deps/glbench/src/teartest.h ('k') | client/deps/glbench/src/testbase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698