OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 <ctype.h> | 8 #include <ctype.h> |
9 | 9 |
10 #include "nanobench.h" | 10 #include "nanobench.h" |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 } | 908 } |
909 fCurrentSubsetImage = 0; | 909 fCurrentSubsetImage = 0; |
910 fUseCodec++; | 910 fUseCodec++; |
911 } | 911 } |
912 | 912 |
913 // Run the BRDBenches | 913 // Run the BRDBenches |
914 // We will benchmark multiple BRD strategies. | 914 // We will benchmark multiple BRD strategies. |
915 const SkBitmapRegionDecoderInterface::Strategy strategies[] = { | 915 const SkBitmapRegionDecoderInterface::Strategy strategies[] = { |
916 SkBitmapRegionDecoderInterface::kOriginal_Strategy, | 916 SkBitmapRegionDecoderInterface::kOriginal_Strategy, |
917 SkBitmapRegionDecoderInterface::kCanvas_Strategy, | 917 SkBitmapRegionDecoderInterface::kCanvas_Strategy, |
| 918 SkBitmapRegionDecoderInterface::kCodec_Strategy, |
918 }; | 919 }; |
919 | 920 |
920 // We intend to create benchmarks that model the use cases in | 921 // We intend to create benchmarks that model the use cases in |
921 // android/libraries/social/tiledimage. In this library, an image is de
coded in 512x512 | 922 // android/libraries/social/tiledimage. In this library, an image is de
coded in 512x512 |
922 // tiles. The image can be translated freely, so the location of a tile
may be anywhere in | 923 // tiles. The image can be translated freely, so the location of a tile
may be anywhere in |
923 // the image. For that reason, we will benchmark decodes in five repres
entative locations | 924 // the image. For that reason, we will benchmark decodes in five repres
entative locations |
924 // in the image. Additionally, this use case utilizes power of two scal
ing, so we will | 925 // in the image. Additionally, this use case utilizes power of two scal
ing, so we will |
925 // test on power of two sample sizes. The output tile is always 512x512
, so, when a | 926 // test on power of two sample sizes. The output tile is always 512x512
, so, when a |
926 // sampleSize is used, the size of the subset that is decoded is always | 927 // sampleSize is used, the size of the subset that is decoded is always |
927 // (sampleSize*512)x(sampleSize*512). | 928 // (sampleSize*512)x(sampleSize*512). |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1290 | 1291 |
1291 return 0; | 1292 return 0; |
1292 } | 1293 } |
1293 | 1294 |
1294 #if !defined SK_BUILD_FOR_IOS | 1295 #if !defined SK_BUILD_FOR_IOS |
1295 int main(int argc, char** argv) { | 1296 int main(int argc, char** argv) { |
1296 SkCommandLineFlags::Parse(argc, argv); | 1297 SkCommandLineFlags::Parse(argc, argv); |
1297 return nanobench_main(); | 1298 return nanobench_main(); |
1298 } | 1299 } |
1299 #endif | 1300 #endif |
OLD | NEW |