2 * Copyright 2015 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
9 #include "SkImageDecoder.h"
10 #include "SkImageInfo.h"
16 * This benchmark is designed to test the performance of image decoding.
17 * It is invoked from the nanobench.cpp file.
20 class DecodingBench : public Benchmark {
22 DecodingBench(SkString path, SkColorType colorType);
25 const char* onGetName() SK_OVERRIDE;
26 bool isSuitableFor(Backend backend) SK_OVERRIDE;
27 void onDraw(const int n, SkCanvas* canvas) SK_OVERRIDE;
31 SkColorType fColorType;
32 SkAutoTDelete<SkMemoryStream> fStream;
33 SkAutoTDelete<SkImageDecoder> fDecoder;
34 typedef Benchmark INHERITED;