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

Side by Side Diff: bench/subset/SubsetSingleBench.cpp

Issue 1220733013: SkCodec no longer inherits from SkImageGenerator. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Manually handle the lifetime of fScanlineDecoder. Created 5 years, 5 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 | « bench/nanobench.cpp ('k') | bench/subset/SubsetTranslateBench.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "SubsetSingleBench.h" 8 #include "SubsetSingleBench.h"
9 #include "SubsetBenchPriv.h" 9 #include "SubsetBenchPriv.h"
10 #include "SkData.h" 10 #include "SkData.h"
11 #include "SkCodec.h" 11 #include "SkCodec.h"
12 #include "SkImageDecoder.h" 12 #include "SkImageDecoder.h"
13 #include "SkOSFile.h" 13 #include "SkOSFile.h"
14 #include "SkScanlineDecoder.h"
14 #include "SkStream.h" 15 #include "SkStream.h"
15 16
16 /* 17 /*
17 * 18 *
18 * This benchmark is designed to test the performance of subset decoding. 19 * This benchmark is designed to test the performance of subset decoding.
19 * It uses an input width, height, left, and top to decode a single subset. 20 * It uses an input width, height, left, and top to decode a single subset.
20 * 21 *
21 */ 22 */
22 23
23 SubsetSingleBench::SubsetSingleBench(const SkString& path, 24 SubsetSingleBench::SubsetSingleBench(const SkString& path,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 SkAutoTDelete<SkImageDecoder> decoder(SkImageDecoder::Factory(fStrea m)); 87 SkAutoTDelete<SkImageDecoder> decoder(SkImageDecoder::Factory(fStrea m));
87 int width, height; 88 int width, height;
88 decoder->buildTileIndex(fStream->duplicate(), &width, &height); 89 decoder->buildTileIndex(fStream->duplicate(), &width, &height);
89 SkBitmap bitmap; 90 SkBitmap bitmap;
90 SkIRect rect = SkIRect::MakeXYWH(fOffsetLeft, fOffsetTop, fSubsetWid th, 91 SkIRect rect = SkIRect::MakeXYWH(fOffsetLeft, fOffsetTop, fSubsetWid th,
91 fSubsetHeight); 92 fSubsetHeight);
92 decoder->decodeSubset(&bitmap, rect, fColorType); 93 decoder->decodeSubset(&bitmap, rect, fColorType);
93 } 94 }
94 } 95 }
95 } 96 }
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | bench/subset/SubsetTranslateBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698