Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Side by Side Diff: bench/nanobench.cpp

Issue 1321433002: Add subsetting to SkScaledCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@gif-scan
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | include/codec/SkCodec.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | include/codec/SkCodec.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698