| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "Benchmark.h" | 8 #include "Benchmark.h" |
| 9 #include "SkImageDecoder.h" | 9 #include "SkImageDecoder.h" |
| 10 #include "SkImageInfo.h" | 10 #include "SkImageInfo.h" |
| 11 #include "SkStream.h" | 11 #include "SkStream.h" |
| 12 #include "SkString.h" | 12 #include "SkString.h" |
| 13 | 13 |
| 14 /* | 14 /* |
| 15 * | 15 * |
| 16 * This benchmark is designed to test the performance of image subset decoding. | 16 * This benchmark is designed to test the performance of image subset decoding. |
| 17 * It is invoked from the nanobench.cpp file. | 17 * It is invoked from the nanobench.cpp file. |
| 18 * | 18 * |
| 19 */ | 19 */ |
| 20 class DecodingSubsetBench : public Benchmark { | 20 class DecodingSubsetBench : public Benchmark { |
| 21 public: | 21 public: |
| 22 DecodingSubsetBench(SkString path, SkColorType colorType, | 22 DecodingSubsetBench(SkString path, SkColorType colorType, |
| 23 const int divisor); | 23 const int divisor); |
| 24 | 24 |
| 25 protected: | 25 protected: |
| 26 const char* onGetName() SK_OVERRIDE; | 26 const char* onGetName() override; |
| 27 bool isSuitableFor(Backend backend) SK_OVERRIDE; | 27 bool isSuitableFor(Backend backend) override; |
| 28 void onDraw(const int n, SkCanvas* canvas) SK_OVERRIDE; | 28 void onDraw(const int n, SkCanvas* canvas) override; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 SkString fName; | 31 SkString fName; |
| 32 SkColorType fColorType; | 32 SkColorType fColorType; |
| 33 const int fDivisor; | 33 const int fDivisor; |
| 34 SkAutoTDelete<SkMemoryStream> fStream; | 34 SkAutoTDelete<SkMemoryStream> fStream; |
| 35 SkAutoTDelete<SkImageDecoder> fDecoder; | 35 SkAutoTDelete<SkImageDecoder> fDecoder; |
| 36 typedef Benchmark INHERITED; | 36 typedef Benchmark INHERITED; |
| 37 }; | 37 }; |
| OLD | NEW |