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

Unified Diff: client/deps/glbench/src/teartest.cc

Issue 1168005: Initialization cleanups and couple other minor things: (Closed)
Patch Set: fixes Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/deps/glbench/src/glx_stuff.cc ('k') | client/deps/glbench/src/xlib_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/deps/glbench/src/teartest.cc
diff --git a/client/deps/glbench/src/teartest.cc b/client/deps/glbench/src/teartest.cc
index d9996e1b30316dc200edf739d5c4d2ddb1e75a16..0b967028e95b72d66f07249a3e100fb6e23bf258 100644
--- a/client/deps/glbench/src/teartest.cc
+++ b/client/deps/glbench/src/teartest.cc
@@ -9,6 +9,7 @@
#include "main.h"
#include "utils.h"
+#include "xlib_window.h"
GLuint GenerateAndBindTexture() {
@@ -66,7 +67,7 @@ static void ParseArgs(int argc, char* argv[]) {
printf("-r requires integer greater than one.\n");
}
} else if (strcmp("-o", argv[i]) == 0) {
- g_override_redirect = false;
+ g_override_redirect = true;
} else if (strcmp("-r", argv[i]) == 0) {
refresh_arg = true;
}
@@ -75,8 +76,9 @@ static void ParseArgs(int argc, char* argv[]) {
int main(int argc, char* argv[]) {
- ParseArgs(argc, argv);
+ g_override_redirect = false;
g_height = -1;
+ ParseArgs(argc, argv);
if (!Init()) {
printf("# Failed to initialize.\n");
return 1;
@@ -109,6 +111,11 @@ int main(int argc, char* argv[]) {
int i = 0;
SwapInterval(g_sleep_duration ? 0 : 1);
for (;;) {
+ XEvent event;
+ Bool got_event = XCheckWindowEvent(xlib_display, xlib_window,
+ KeyPressMask, &event);
+ if (got_event)
+ break;
glClear(GL_COLOR_BUFFER_BIT);
glUniform1f(shift_uniform, 1.f / g_width *
(i < g_width ? i : 2 * g_width - i));
« no previous file with comments | « client/deps/glbench/src/glx_stuff.cc ('k') | client/deps/glbench/src/xlib_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698