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

Side by Side Diff: bench/BitmapRegionDecoderBench.cpp

Issue 2212493002: Convert SkAutoTUnref<SkData> to sk_sp<SkData>. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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/BitmapRegionDecoderBench.h ('k') | bench/CodecBench.h » ('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"
(...skipping 18 matching lines...) Expand all
29 29
30 const char* BitmapRegionDecoderBench::onGetName() { 30 const char* BitmapRegionDecoderBench::onGetName() {
31 return fName.c_str(); 31 return fName.c_str();
32 } 32 }
33 33
34 bool BitmapRegionDecoderBench::isSuitableFor(Backend backend) { 34 bool BitmapRegionDecoderBench::isSuitableFor(Backend backend) {
35 return kNonRendering_Backend == backend; 35 return kNonRendering_Backend == backend;
36 } 36 }
37 37
38 void BitmapRegionDecoderBench::onDelayedSetup() { 38 void BitmapRegionDecoderBench::onDelayedSetup() {
39 fBRD.reset(SkBitmapRegionDecoder::Create(fData, SkBitmapRegionDecoder::kAndr oidCodec_Strategy)); 39 fBRD.reset(SkBitmapRegionDecoder::Create(fData.get(),
40 SkBitmapRegionDecoder::kAndroidCode c_Strategy));
40 } 41 }
41 42
42 void BitmapRegionDecoderBench::onDraw(int n, SkCanvas* canvas) { 43 void BitmapRegionDecoderBench::onDraw(int n, SkCanvas* canvas) {
43 for (int i = 0; i < n; i++) { 44 for (int i = 0; i < n; i++) {
44 SkBitmap bm; 45 SkBitmap bm;
45 SkAssertResult(fBRD->decodeRegion(&bm, nullptr, fSubset, fSampleSize, fC olorType, false)); 46 SkAssertResult(fBRD->decodeRegion(&bm, nullptr, fSubset, fSampleSize, fC olorType, false));
46 } 47 }
47 } 48 }
OLDNEW
« no previous file with comments | « bench/BitmapRegionDecoderBench.h ('k') | bench/CodecBench.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698