Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2015 Google Inc. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 #include "Benchmark.h" | |
| 9 #include "SkImageDecoder.h" | |
| 10 #include "SkImageInfo.h" | |
| 11 #include "SkStream.h" | |
| 12 #include "SkString.h" | |
| 13 | |
| 14 /* | |
| 15 * | |
| 16 * This benchmark is designed to test the performance of subset decoding. | |
| 17 * It uses a divisor to decode the entire image in a grid of divisor x divisor b locks. | |
| 18 * | |
| 19 */ | |
| 20 class SubsetDivisorBench : public Benchmark { | |
|
scroggo
2015/06/01 17:25:15
I remember you were concerned about having so many
msarett
2015/06/01 20:37:02
I will move them immediately after the next upload
| |
| 21 public: | |
| 22 | |
| 23 static SubsetDivisorBench* Create(SkString* path, | |
|
scroggo
2015/06/01 17:25:14
Why does this take a pointer to a path? Why not a
msarett
2015/06/01 20:37:02
Agreed. There is not a good reason for this to be
| |
| 24 SkColorType colorType, | |
| 25 uint32_t divisor, | |
| 26 bool useCodec); | |
| 27 | |
| 28 protected: | |
| 29 const char* onGetName() override; | |
| 30 bool isSuitableFor(Backend backend) override; | |
| 31 void onDraw(const int n, SkCanvas* canvas) override; | |
| 32 | |
| 33 private: | |
| 34 | |
| 35 SubsetDivisorBench(SkString* stream, | |
| 36 SkColorType colorType, | |
| 37 uint32_t divisor, | |
| 38 bool useCodec); | |
| 39 | |
| 40 | |
| 41 SkString fName; | |
|
scroggo
2015/06/01 17:25:14
style nit: typically we line up the names of membe
msarett
2015/06/01 20:37:02
Done.
| |
| 42 SkColorType fColorType; | |
| 43 const uint32_t fDivisor; | |
| 44 const bool fUseCodec; | |
| 45 SkAutoTDelete<SkMemoryStream> fStream; | |
| 46 typedef Benchmark INHERITED; | |
| 47 }; | |
| OLD | NEW |