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

Side by Side Diff: bench/nanobench.cpp

Issue 801413002: fix last warnings on w64 and turn on w.a.e. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix/simplify memset bench name printing Created 6 years 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 | « bench/MemsetBench.cpp ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 // First add all .skps as RecordingBenches. 518 // First add all .skps as RecordingBenches.
519 while (fCurrentRecording < fSKPs.count()) { 519 while (fCurrentRecording < fSKPs.count()) {
520 const SkString& path = fSKPs[fCurrentRecording++]; 520 const SkString& path = fSKPs[fCurrentRecording++];
521 SkAutoTUnref<SkPicture> pic; 521 SkAutoTUnref<SkPicture> pic;
522 if (!ReadPicture(path.c_str(), &pic)) { 522 if (!ReadPicture(path.c_str(), &pic)) {
523 continue; 523 continue;
524 } 524 }
525 SkString name = SkOSPath::Basename(path.c_str()); 525 SkString name = SkOSPath::Basename(path.c_str());
526 fSourceType = "skp"; 526 fSourceType = "skp";
527 fBenchType = "recording"; 527 fBenchType = "recording";
528 fSKPBytes = SkPictureUtils::ApproximateBytesUsed(pic); 528 fSKPBytes = static_cast<double>(SkPictureUtils::ApproximateBytesUsed (pic));
529 fSKPOps = pic->approximateOpCount(); 529 fSKPOps = pic->approximateOpCount();
530 return SkNEW_ARGS(RecordingBench, (name.c_str(), pic.get(), FLAGS_bb h)); 530 return SkNEW_ARGS(RecordingBench, (name.c_str(), pic.get(), FLAGS_bb h));
531 } 531 }
532 532
533 // Then once each for each scale as SKPBenches (playback). 533 // Then once each for each scale as SKPBenches (playback).
534 while (fCurrentScale < fScales.count()) { 534 while (fCurrentScale < fScales.count()) {
535 while (fCurrentSKP < fSKPs.count()) { 535 while (fCurrentSKP < fSKPs.count()) {
536 const SkString& path = fSKPs[fCurrentSKP]; 536 const SkString& path = fSKPs[fCurrentSKP];
537 SkAutoTUnref<SkPicture> pic; 537 SkAutoTUnref<SkPicture> pic;
538 if (!ReadPicture(path.c_str(), &pic)) { 538 if (!ReadPicture(path.c_str(), &pic)) {
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 796
797 return 0; 797 return 0;
798 } 798 }
799 799
800 #if !defined SK_BUILD_FOR_IOS 800 #if !defined SK_BUILD_FOR_IOS
801 int main(int argc, char** argv) { 801 int main(int argc, char** argv) {
802 SkCommandLineFlags::Parse(argc, argv); 802 SkCommandLineFlags::Parse(argc, argv);
803 return nanobench_main(); 803 return nanobench_main();
804 } 804 }
805 #endif 805 #endif
OLDNEW
« no previous file with comments | « bench/MemsetBench.cpp ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698