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

Side by Side Diff: bench/RepeatTileBench.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/RectanizerBench.cpp ('k') | bench/ResultsWriter.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 int gg = conv_6_to_byte(g); 59 int gg = conv_6_to_byte(g);
60 for (int b = 0; b < 6; b++) { 60 for (int b = 0; b < 6; b++) {
61 int bb = conv_6_to_byte(b); 61 int bb = conv_6_to_byte(b);
62 *colors++ = SkPreMultiplyARGB(0xFF, rr, gg, bb); 62 *colors++ = SkPreMultiplyARGB(0xFF, rr, gg, bb);
63 } 63 }
64 } 64 }
65 } 65 }
66 SkColorTable* ctable = new SkColorTable(storage, 216); 66 SkColorTable* ctable = new SkColorTable(storage, 216);
67 dst->allocPixels(SkImageInfo::Make(src.width(), src.height(), 67 dst->allocPixels(SkImageInfo::Make(src.width(), src.height(),
68 kIndex_8_SkColorType, kOpaque_SkAlphaType ), 68 kIndex_8_SkColorType, kOpaque_SkAlphaType ),
69 NULL, ctable); 69 nullptr, ctable);
70 ctable->unref(); 70 ctable->unref();
71 71
72 SkAutoLockPixels alps(src); 72 SkAutoLockPixels alps(src);
73 SkAutoLockPixels alpd(*dst); 73 SkAutoLockPixels alpd(*dst);
74 74
75 for (int y = 0; y < src.height(); y++) { 75 for (int y = 0; y < src.height(); y++) {
76 const SkPMColor* srcP = src.getAddr32(0, y); 76 const SkPMColor* srcP = src.getAddr32(0, y);
77 uint8_t* dstP = dst->getAddr8(0, y); 77 uint8_t* dstP = dst->getAddr8(0, y);
78 for (int x = src.width() - 1; x >= 0; --x) { 78 for (int x = src.width() - 1; x >= 0; --x) {
79 *dstP++ = compute_666_index(*srcP++); 79 *dstP++ = compute_666_index(*srcP++);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 private: 139 private:
140 typedef Benchmark INHERITED; 140 typedef Benchmark INHERITED;
141 }; 141 };
142 142
143 DEF_BENCH(return new RepeatTileBench(kN32_SkColorType, kOpaque_SkAlphaType)) 143 DEF_BENCH(return new RepeatTileBench(kN32_SkColorType, kOpaque_SkAlphaType))
144 DEF_BENCH(return new RepeatTileBench(kN32_SkColorType, kPremul_SkAlphaType)) 144 DEF_BENCH(return new RepeatTileBench(kN32_SkColorType, kPremul_SkAlphaType))
145 DEF_BENCH(return new RepeatTileBench(kRGB_565_SkColorType, kOpaque_SkAlphaType)) 145 DEF_BENCH(return new RepeatTileBench(kRGB_565_SkColorType, kOpaque_SkAlphaType))
146 DEF_BENCH(return new RepeatTileBench(kIndex_8_SkColorType, kPremul_SkAlphaType)) 146 DEF_BENCH(return new RepeatTileBench(kIndex_8_SkColorType, kPremul_SkAlphaType))
OLDNEW
« no previous file with comments | « bench/RectanizerBench.cpp ('k') | bench/ResultsWriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698