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

Side by Side Diff: bench/nanobench.cpp

Issue 474983007: fix numerical overflows in 565 blends (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove workaround from nanobench Created 6 years, 4 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 | src/core/SkBlitRow_D16.cpp » ('j') | 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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 <ctype.h> 8 #include <ctype.h>
9 9
10 #include "Benchmark.h" 10 #include "Benchmark.h"
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 create_targets(&targets, bench.get(), configs); 588 create_targets(&targets, bench.get(), configs);
589 589
590 if (!targets.isEmpty()) { 590 if (!targets.isEmpty()) {
591 log->bench(bench->getName(), bench->getSize().fX, bench->getSize().f Y); 591 log->bench(bench->getName(), bench->getSize().fX, bench->getSize().f Y);
592 bench->preDraw(); 592 bench->preDraw();
593 } 593 }
594 for (int j = 0; j < targets.count(); j++) { 594 for (int j = 0; j < targets.count(); j++) {
595 SkCanvas* canvas = targets[j]->surface.get() ? targets[j]->surface-> getCanvas() : NULL; 595 SkCanvas* canvas = targets[j]->surface.get() ? targets[j]->surface-> getCanvas() : NULL;
596 const char* config = targets[j]->config.name; 596 const char* config = targets[j]->config.name;
597 597
598 #ifdef SK_DEBUG
599 // skia:2797 Some SKPs SkASSERT in debug mode. Skip them for now.
600 if (0 == strcmp("565", config) && SkStrContains(bench->getName(), ". skp")) {
601 SkDebugf("Skipping 565 %s. See skia:2797\n", bench->getName());
602 continue;
603 }
604 #endif
605
606 const int loops = 598 const int loops =
607 #if SK_SUPPORT_GPU 599 #if SK_SUPPORT_GPU
608 Benchmark::kGPU_Backend == targets[j]->config.backend 600 Benchmark::kGPU_Backend == targets[j]->config.backend
609 ? gpu_bench(targets[j]->gl, bench.get(), canvas, samples.get()) 601 ? gpu_bench(targets[j]->gl, bench.get(), canvas, samples.get())
610 : 602 :
611 #endif 603 #endif
612 cpu_bench( overhead, bench.get(), canvas, samples.get()); 604 cpu_bench( overhead, bench.get(), canvas, samples.get());
613 605
614 if (canvas && !FLAGS_writePath.isEmpty() && NULL != FLAGS_writePath[ 0]) { 606 if (canvas && !FLAGS_writePath.isEmpty() && NULL != FLAGS_writePath[ 0]) {
615 SkString pngFilename = SkOSPath::Join(FLAGS_writePath[0], config ); 607 SkString pngFilename = SkOSPath::Join(FLAGS_writePath[0], config );
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 674
683 return 0; 675 return 0;
684 } 676 }
685 677
686 #if !defined SK_BUILD_FOR_IOS 678 #if !defined SK_BUILD_FOR_IOS
687 int main(int argc, char** argv) { 679 int main(int argc, char** argv) {
688 SkCommandLineFlags::Parse(argc, argv); 680 SkCommandLineFlags::Parse(argc, argv);
689 return nanobench_main(); 681 return nanobench_main();
690 } 682 }
691 #endif 683 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBlitRow_D16.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698