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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 } | 943 } |
944 | 944 |
945 // Run the BRDBenches | 945 // Run the BRDBenches |
946 // We will benchmark multiple BRD strategies. | 946 // We will benchmark multiple BRD strategies. |
947 static const struct { | 947 static const struct { |
948 SkBitmapRegionDecoderInterface::Strategy fStrategy; | 948 SkBitmapRegionDecoderInterface::Strategy fStrategy; |
949 const char* fName; | 949 const char* fName; |
950 } strategies[] = { | 950 } strategies[] = { |
951 { SkBitmapRegionDecoderInterface::kOriginal_Strategy, "BRD" }, | 951 { SkBitmapRegionDecoderInterface::kOriginal_Strategy, "BRD" }, |
952 { SkBitmapRegionDecoderInterface::kCanvas_Strategy, "BRD_canvas"
}, | 952 { SkBitmapRegionDecoderInterface::kCanvas_Strategy, "BRD_canvas"
}, |
| 953 { SkBitmapRegionDecoderInterface::kCodec_Strategy, "BRD_codec"
}, |
953 }; | 954 }; |
954 | 955 |
955 // We intend to create benchmarks that model the use cases in | 956 // We intend to create benchmarks that model the use cases in |
956 // android/libraries/social/tiledimage. In this library, an image is de
coded in 512x512 | 957 // android/libraries/social/tiledimage. In this library, an image is de
coded in 512x512 |
957 // tiles. The image can be translated freely, so the location of a tile
may be anywhere in | 958 // tiles. The image can be translated freely, so the location of a tile
may be anywhere in |
958 // the image. For that reason, we will benchmark decodes in five repres
entative locations | 959 // the image. For that reason, we will benchmark decodes in five repres
entative locations |
959 // in the image. Additionally, this use case utilizes power of two scal
ing, so we will | 960 // in the image. Additionally, this use case utilizes power of two scal
ing, so we will |
960 // test on power of two sample sizes. The output tile is always 512x512
, so, when a | 961 // test on power of two sample sizes. The output tile is always 512x512
, so, when a |
961 // sampleSize is used, the size of the subset that is decoded is always | 962 // sampleSize is used, the size of the subset that is decoded is always |
962 // (sampleSize*512)x(sampleSize*512). | 963 // (sampleSize*512)x(sampleSize*512). |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 | 1328 |
1328 return 0; | 1329 return 0; |
1329 } | 1330 } |
1330 | 1331 |
1331 #if !defined SK_BUILD_FOR_IOS | 1332 #if !defined SK_BUILD_FOR_IOS |
1332 int main(int argc, char** argv) { | 1333 int main(int argc, char** argv) { |
1333 SkCommandLineFlags::Parse(argc, argv); | 1334 SkCommandLineFlags::Parse(argc, argv); |
1334 return nanobench_main(); | 1335 return nanobench_main(); |
1335 } | 1336 } |
1336 #endif | 1337 #endif |
OLD | NEW |