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

Side by Side Diff: bench/benchmain.cpp

Issue 26882003: fix mac10.6 build (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | « 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 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #if SK_SUPPORT_GPU 9 #if SK_SUPPORT_GPU
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 timer.end(); 647 timer.end();
648 648
649 #if SK_SUPPORT_GPU 649 #if SK_SUPPORT_GPU
650 // currently we only setup the frame interval for the GPU 650 // currently we only setup the frame interval for the GPU
651 if (!frameIntervalComputed && NULL != glContext) { 651 if (!frameIntervalComputed && NULL != glContext) {
652 frameIntervalTime += timer.fWall; 652 frameIntervalTime += timer.fWall;
653 frameIntervalTotalLoops += loopsPerIter; 653 frameIntervalTotalLoops += loopsPerIter;
654 if (frameIntervalTime >= FLAGS_minMs) { 654 if (frameIntervalTime >= FLAGS_minMs) {
655 frameIntervalComputed = true; 655 frameIntervalComputed = true;
656 loopsPerFrame = 656 loopsPerFrame =
657 ((double)frameIntervalTotalLoops / frameIntervalTime ) * FLAGS_minMs; 657 (int)(((double)frameIntervalTotalLoops / frameInterval Time) * FLAGS_minMs);
658 if (loopsPerFrame < 1) { 658 if (loopsPerFrame < 1) {
659 loopsPerFrame = 1; 659 loopsPerFrame = 1;
660 } 660 }
661 // SkDebugf(" %s has %d loops in %f ms (normalized to %d )\n", 661 // SkDebugf(" %s has %d loops in %f ms (normalized to %d )\n",
662 // bench->getName(), frameIntervalTotalLoops, 662 // bench->getName(), frameIntervalTotalLoops,
663 // timer.fWall, loopsPerFrame); 663 // timer.fWall, loopsPerFrame);
664 } 664 }
665 } 665 }
666 #endif 666 #endif
667 const double current = timer.fWall / loopsPerIter; 667 const double current = timer.fWall / loopsPerIter;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 gContextFactory.destroyContexts(); 712 gContextFactory.destroyContexts();
713 #endif 713 #endif
714 return 0; 714 return 0;
715 } 715 }
716 716
717 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 717 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
718 int main(int argc, char * const argv[]) { 718 int main(int argc, char * const argv[]) {
719 return tool_main(argc, (char**) argv); 719 return tool_main(argc, (char**) argv);
720 } 720 }
721 #endif 721 #endif
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