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

Side by Side Diff: bench/DecodingBench.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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/DashBench.cpp ('k') | bench/ETCBitmapBench.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 "DecodingBench.h" 8 #include "DecodingBench.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 27 matching lines...) Expand all
38 break; 38 break;
39 default: 39 default:
40 colorName = "Unknown"; 40 colorName = "Unknown";
41 } 41 }
42 fName.printf("Decode_%s_%s", baseName.c_str(), colorName); 42 fName.printf("Decode_%s_%s", baseName.c_str(), colorName);
43 43
44 #ifdef SK_DEBUG 44 #ifdef SK_DEBUG
45 // Ensure that we can create a decoder. 45 // Ensure that we can create a decoder.
46 SkAutoTDelete<SkStreamRewindable> stream(new SkMemoryStream(fData)); 46 SkAutoTDelete<SkStreamRewindable> stream(new SkMemoryStream(fData));
47 SkAutoTDelete<SkImageDecoder> decoder(SkImageDecoder::Factory(stream)); 47 SkAutoTDelete<SkImageDecoder> decoder(SkImageDecoder::Factory(stream));
48 SkASSERT(decoder != NULL); 48 SkASSERT(decoder != nullptr);
49 #endif 49 #endif
50 } 50 }
51 51
52 const char* DecodingBench::onGetName() { 52 const char* DecodingBench::onGetName() {
53 return fName.c_str(); 53 return fName.c_str();
54 } 54 }
55 55
56 bool DecodingBench::isSuitableFor(Backend backend) { 56 bool DecodingBench::isSuitableFor(Backend backend) {
57 return kNonRendering_Backend == backend; 57 return kNonRendering_Backend == backend;
58 } 58 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 for (int i = 0; i < n; i++) { 101 for (int i = 0; i < n; i++) {
102 // create a new stream and a new decoder to mimic the behavior of 102 // create a new stream and a new decoder to mimic the behavior of
103 // CodecBench. 103 // CodecBench.
104 stream.reset(new SkMemoryStream(fData)); 104 stream.reset(new SkMemoryStream(fData));
105 decoder.reset(SkImageDecoder::Factory(stream)); 105 decoder.reset(SkImageDecoder::Factory(stream));
106 decoder->setAllocator(&allocator); 106 decoder->setAllocator(&allocator);
107 decoder->decode(stream, &bitmap, fColorType, 107 decoder->decode(stream, &bitmap, fColorType,
108 SkImageDecoder::kDecodePixels_Mode); 108 SkImageDecoder::kDecodePixels_Mode);
109 } 109 }
110 } 110 }
OLDNEW
« no previous file with comments | « bench/DashBench.cpp ('k') | bench/ETCBitmapBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698