OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "BenchTimer.h" | 8 #include "BenchTimer.h" |
9 #include "ResultsWriter.h" | 9 #include "ResultsWriter.h" |
10 #include "SkBenchLogger.h" | 10 #include "SkBenchLogger.h" |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 SkBenchmark::SetResourcePath(FLAGS_resourcePath[0]); | 361 SkBenchmark::SetResourcePath(FLAGS_resourcePath[0]); |
362 } | 362 } |
363 | 363 |
364 #if SK_SUPPORT_GPU | 364 #if SK_SUPPORT_GPU |
365 for (int i = 0; i < configs.count(); ++i) { | 365 for (int i = 0; i < configs.count(); ++i) { |
366 const Config& config = gConfigs[configs[i]]; | 366 const Config& config = gConfigs[configs[i]]; |
367 | 367 |
368 if (SkBenchmark::kGPU_Backend == config.backend) { | 368 if (SkBenchmark::kGPU_Backend == config.backend) { |
369 GrContext* context = gContextFactory.get(config.contextType); | 369 GrContext* context = gContextFactory.get(config.contextType); |
370 if (NULL == context) { | 370 if (NULL == context) { |
371 logger.logError(SkStringPrintf( | 371 SkDebugf("GrContext could not be created for config %s. Config w
ill be skipped.\n", |
372 "Error creating GrContext for config %s. Config will be skip
ped.\n", | 372 config.name); |
373 config.name)); | |
374 configs.remove(i); | 373 configs.remove(i); |
375 --i; | 374 --i; |
376 continue; | 375 continue; |
377 } | 376 } |
378 if (config.sampleCount > context->getMaxSampleCount()){ | 377 if (config.sampleCount > context->getMaxSampleCount()){ |
379 logger.logError(SkStringPrintf( | 378 SkDebugf( |
380 "Sample count (%d) for config %s is unsupported. Config will
be skipped.\n", | 379 "Sample count (%d) for config %s is not supported. Config wi
ll be skipped.\n", |
381 config.sampleCount, config.name)); | 380 config.sampleCount, config.name); |
382 configs.remove(i); | 381 configs.remove(i); |
383 --i; | 382 --i; |
384 continue; | 383 continue; |
385 } | 384 } |
386 } | 385 } |
387 } | 386 } |
388 #endif | 387 #endif |
389 | 388 |
390 // All flags should be parsed now. Report our settings. | 389 // All flags should be parsed now. Report our settings. |
391 if (FLAGS_runOnce) { | 390 if (FLAGS_runOnce) { |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 gContextFactory.destroyContexts(); | 698 gContextFactory.destroyContexts(); |
700 #endif | 699 #endif |
701 return 0; | 700 return 0; |
702 } | 701 } |
703 | 702 |
704 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 703 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
705 int main(int argc, char * const argv[]) { | 704 int main(int argc, char * const argv[]) { |
706 return tool_main(argc, (char**) argv); | 705 return tool_main(argc, (char**) argv); |
707 } | 706 } |
708 #endif | 707 #endif |
OLD | NEW |