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 subset decoding.
17 * It is invoked from the nanobench.cpp file.
20 class DecodingSubsetBench : public Benchmark {
22 DecodingSubsetBench(SkString path, SkColorType colorType,
26 const char* onGetName() SK_OVERRIDE;
27 bool isSuitableFor(Backend backend) SK_OVERRIDE;
28 void onDraw(const int n, SkCanvas* canvas) SK_OVERRIDE;
32 SkColorType fColorType;
34 SkAutoTDelete<SkMemoryStream> fStream;
35 SkAutoTDelete<SkImageDecoder> fDecoder;
36 typedef Benchmark INHERITED;