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

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

Issue 897003: set resource loading path relative to the executable (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | client/deps/glbench/src/utils.h » ('j') | client/deps/glbench/src/utils.cc » ('J')
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 <fcntl.h> 5 #include <fcntl.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 #include <sys/mman.h> 9 #include <sys/mman.h>
10 10
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 test_name_arg = true; 597 test_name_arg = true;
598 } else if (strcmp("-d", argv[i]) == 0) { 598 } else if (strcmp("-d", argv[i]) == 0) {
599 duration_arg = true; 599 duration_arg = true;
600 } 600 }
601 } 601 }
602 *enabled_tests_ptr++ = NULL; 602 *enabled_tests_ptr++ = NULL;
603 } 603 }
604 604
605 605
606 int main(int argc, char *argv[]) { 606 int main(int argc, char *argv[]) {
607 SetBasePathFromArgv0(argv[0], "src");
607 ParseArgs(argc, argv); 608 ParseArgs(argc, argv);
608 if (!Init()) { 609 if (!Init()) {
609 printf("# Failed to initialize.\n"); 610 printf("# Failed to initialize.\n");
610 return 1; 611 return 1;
611 } 612 }
612 613
613 void (*test[])() = { 614 void (*test[])() = {
614 SwapTest, 615 SwapTest,
615 ClearTest, 616 ClearTest,
616 FillRateTest, 617 FillRateTest,
(...skipping 11 matching lines...) Expand all
628 test[i](); 629 test[i]();
629 GLenum err = glGetError(); 630 GLenum err = glGetError();
630 if (err != 0) 631 if (err != 0)
631 printf("# glGetError returned non-zero: 0x%x\n", err); 632 printf("# glGetError returned non-zero: 0x%x\n", err);
632 DestroyContext(); 633 DestroyContext();
633 } 634 }
634 } while (GetUTime() < done); 635 } while (GetUTime() < done);
635 636
636 return 0; 637 return 0;
637 } 638 }
OLDNEW
« no previous file with comments | « no previous file | client/deps/glbench/src/utils.h » ('j') | client/deps/glbench/src/utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698