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

Side by Side Diff: bench/nanobench.cpp

Issue 572933006: nanobench: lazily decode bitmaps from SKPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | gyp/bench.gyp » ('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"
11 #include "CrashHandler.h" 11 #include "CrashHandler.h"
12 #include "GMBench.h" 12 #include "GMBench.h"
13 #include "LazyDecodeBitmap.h"
13 #include "ProcStats.h" 14 #include "ProcStats.h"
14 #include "ResultsWriter.h" 15 #include "ResultsWriter.h"
15 #include "RecordingBench.h" 16 #include "RecordingBench.h"
16 #include "SKPBench.h" 17 #include "SKPBench.h"
17 #include "Stats.h" 18 #include "Stats.h"
18 #include "Timer.h" 19 #include "Timer.h"
19 20
20 #include "SkBBHFactory.h" 21 #include "SkBBHFactory.h"
21 #include "SkCanvas.h" 22 #include "SkCanvas.h"
22 #include "SkCommonFlags.h" 23 #include "SkCommonFlags.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, path)) { 444 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, path)) {
444 return false; 445 return false;
445 } 446 }
446 447
447 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path)); 448 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path));
448 if (stream.get() == NULL) { 449 if (stream.get() == NULL) {
449 SkDebugf("Could not read %s.\n", path); 450 SkDebugf("Could not read %s.\n", path);
450 return false; 451 return false;
451 } 452 }
452 453
453 pic->reset(SkPicture::CreateFromStream(stream.get())); 454 pic->reset(SkPicture::CreateFromStream(stream.get(), sk_tools::LazyDecod eBitmap));
454 if (pic->get() == NULL) { 455 if (pic->get() == NULL) {
455 SkDebugf("Could not read %s as an SkPicture.\n", path); 456 SkDebugf("Could not read %s as an SkPicture.\n", path);
456 return false; 457 return false;
457 } 458 }
458 return true; 459 return true;
459 } 460 }
460 461
461 Benchmark* next() { 462 Benchmark* next() {
462 if (fBenches) { 463 if (fBenches) {
463 Benchmark* bench = fBenches->factory()(NULL); 464 Benchmark* bench = fBenches->factory()(NULL);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 714
714 return 0; 715 return 0;
715 } 716 }
716 717
717 #if !defined SK_BUILD_FOR_IOS 718 #if !defined SK_BUILD_FOR_IOS
718 int main(int argc, char** argv) { 719 int main(int argc, char** argv) {
719 SkCommandLineFlags::Parse(argc, argv); 720 SkCommandLineFlags::Parse(argc, argv);
720 return nanobench_main(); 721 return nanobench_main();
721 } 722 }
722 #endif 723 #endif
OLDNEW
« no previous file with comments | « no previous file | gyp/bench.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698