aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-09 21:59:56 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-09 21:59:56 +0000
commit757cdc4e7399da991b2881f367249424124da895 (patch)
treee2b9391729c359bef12e9c7084439cf869fd0479
parent87ec860f3899b41fcc465bd6ceb2e940eb2442f9 (diff)
check for missing filename (needs to be specified when tool is launched)
git-svn-id: http://skia.googlecode.com/svn/trunk@1287 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--bench/DecodeBench.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/bench/DecodeBench.cpp b/bench/DecodeBench.cpp
index 6abd05456f..ac11089784 100644
--- a/bench/DecodeBench.cpp
+++ b/bench/DecodeBench.cpp
@@ -33,10 +33,12 @@ protected:
}
virtual void onDraw(SkCanvas* canvas) {
- for (int i = 0; i < N; i++) {
- SkBitmap bm;
- SkImageDecoder::DecodeFile(fFilename, &bm, fPrefConfig,
- SkImageDecoder::kDecodePixels_Mode);
+ if (fFilename) {
+ for (int i = 0; i < N; i++) {
+ SkBitmap bm;
+ SkImageDecoder::DecodeFile(fFilename, &bm, fPrefConfig,
+ SkImageDecoder::kDecodePixels_Mode);
+ }
}
}