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

Side by Side Diff: bench/benchmain.cpp

Issue 23923011: Fix bench logging for --repeat 1 (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 3 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 9
10 #include "BenchTimer.h" 10 #include "BenchTimer.h"
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 SK_GL(*glContext, Finish()); 916 SK_GL(*glContext, Finish());
917 } 917 }
918 #endif 918 #endif
919 // stop the inclusive and gpu timers once all the GL calls 919 // stop the inclusive and gpu timers once all the GL calls
920 // have completed 920 // have completed
921 timer->end(); 921 timer->end();
922 922
923 SkAssertResult(timerData.appendTimes(timer)); 923 SkAssertResult(timerData.appendTimes(timer));
924 924
925 } 925 }
926 if (repeatDraw > 1) { 926 const char* timeFormat;
927 const char* timeFormat; 927 if (repeatDraw > 1 && TimerData::kPerIter_Result == timerResult) {
928 if (TimerData::kPerIter_Result == timerResult) { 928 timeFormat = perIterTimeformat.c_str();
929 timeFormat = perIterTimeformat.c_str(); 929 } else {
930 } else { 930 timeFormat = normalTimeFormat.c_str();
931 timeFormat = normalTimeFormat.c_str();
932 }
933 uint32_t filteredTimerTypes = timerTypes;
934 if (NULL == context) {
935 filteredTimerTypes &= ~TimerData::kGpu_Flag;
936 }
937 SkString result = timerData.getResult(timeFormat,
938 timerResult,
939 configName,
940 filteredTimerTypes);
941 logger.logProgress(result);
942 } 931 }
932 uint32_t filteredTimerTypes = timerTypes;
933 if (NULL == context) {
934 filteredTimerTypes &= ~TimerData::kGpu_Flag;
935 }
936 SkString result = timerData.getResult(timeFormat,
937 timerResult,
938 configName,
939 filteredTimerTypes);
940 logger.logProgress(result);
941
943 if (outDir.size() > 0 && kNonRendering_Backend != backend) { 942 if (outDir.size() > 0 && kNonRendering_Backend != backend) {
944 saveFile(bench->getName(), configName, outDir.c_str(), 943 saveFile(bench->getName(), configName, outDir.c_str(),
945 device->accessBitmap(false)); 944 device->accessBitmap(false));
946 } 945 }
947 } 946 }
948 } 947 }
949 if (loggedBenchStart) { 948 if (loggedBenchStart) {
950 logger.logProgress(SkString("\n")); 949 logger.logProgress(SkString("\n"));
951 } 950 }
952 } 951 }
(...skipping 17 matching lines...) Expand all
970 } 969 }
971 970
972 return 0; 971 return 0;
973 } 972 }
974 973
975 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 974 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
976 int main(int argc, char * const argv[]) { 975 int main(int argc, char * const argv[]) {
977 return tool_main(argc, (char**) argv); 976 return tool_main(argc, (char**) argv);
978 } 977 }
979 #endif 978 #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