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

Side by Side Diff: bench/BitmapRegionDecoderBench.cpp

Issue 1417393004: Reorganize BRD code in new tools directory (Closed) Base URL: https://skia.googlesource.com/skia.git@delete-imdec
Patch Set: tools/android Created 5 years, 1 month 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') | 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 "BitmapRegionDecoderBench.h" 8 #include "BitmapRegionDecoderBench.h"
9 #include "CodecBenchPriv.h" 9 #include "CodecBenchPriv.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
11 #include "SkCodecTools.h" 11 #include "SkBitmapRegionDecoderPriv.h"
12 #include "SkOSFile.h" 12 #include "SkOSFile.h"
13 13
14 BitmapRegionDecoderBench::BitmapRegionDecoderBench(const char* baseName, SkData* encoded, 14 BitmapRegionDecoderBench::BitmapRegionDecoderBench(const char* baseName, SkData* encoded,
15 SkBitmapRegionDecoder::Strategy strategy, SkColorType colorType, 15 SkBitmapRegionDecoder::Strategy strategy, SkColorType colorType,
16 uint32_t sampleSize, const SkIRect& subset) 16 uint32_t sampleSize, const SkIRect& subset)
17 : fBRD(nullptr) 17 : fBRD(nullptr)
18 , fData(SkRef(encoded)) 18 , fData(SkRef(encoded))
19 , fStrategy(strategy) 19 , fStrategy(strategy)
20 , fColorType(colorType) 20 , fColorType(colorType)
21 , fSampleSize(sampleSize) 21 , fSampleSize(sampleSize)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void BitmapRegionDecoderBench::onDelayedSetup() { 56 void BitmapRegionDecoderBench::onDelayedSetup() {
57 fBRD.reset(SkBitmapRegionDecoder::Create(fData, fStrategy)); 57 fBRD.reset(SkBitmapRegionDecoder::Create(fData, fStrategy));
58 } 58 }
59 59
60 void BitmapRegionDecoderBench::onDraw(int n, SkCanvas* canvas) { 60 void BitmapRegionDecoderBench::onDraw(int n, SkCanvas* canvas) {
61 for (int i = 0; i < n; i++) { 61 for (int i = 0; i < n; i++) {
62 SkBitmap bm; 62 SkBitmap bm;
63 SkAssertResult(fBRD->decodeRegion(&bm, nullptr, fSubset, fSampleSize, fC olorType, false)); 63 SkAssertResult(fBRD->decodeRegion(&bm, nullptr, fSubset, fSampleSize, fC olorType, false));
64 } 64 }
65 } 65 }
OLDNEW
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698