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

Side by Side Diff: bench/BitmapRegionDecoderBench.cpp

Issue 2333713002: change SkStreams to work with sk_sp<SkData> instead of SkData* (Closed)
Patch Set: fix xpsdevice Created 4 years, 3 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/AndroidCodecBench.cpp ('k') | bench/CodecBench.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"
(...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.get(), 39 fBRD.reset(SkBitmapRegionDecoder::Create(fData, SkBitmapRegionDecoder::kAndr oidCodec_Strategy));
40 SkBitmapRegionDecoder::kAndroidCode c_Strategy));
41 } 40 }
42 41
43 void BitmapRegionDecoderBench::onDraw(int n, SkCanvas* canvas) { 42 void BitmapRegionDecoderBench::onDraw(int n, SkCanvas* canvas) {
44 for (int i = 0; i < n; i++) { 43 for (int i = 0; i < n; i++) {
45 SkBitmap bm; 44 SkBitmap bm;
46 SkAssertResult(fBRD->decodeRegion(&bm, nullptr, fSubset, fSampleSize, fC olorType, false)); 45 SkAssertResult(fBRD->decodeRegion(&bm, nullptr, fSubset, fSampleSize, fC olorType, false));
47 } 46 }
48 } 47 }
OLDNEW
« no previous file with comments | « bench/AndroidCodecBench.cpp ('k') | bench/CodecBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698