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

Side by Side Diff: bench/BitmapBench.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/BezierBench.cpp ('k') | bench/BlurImageFilterBench.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 2011 Google Inc. 2 * Copyright 2011 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 "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 28 matching lines...) Expand all
39 for (int g = 0; g < 6; g++) { 39 for (int g = 0; g < 6; g++) {
40 int gg = conv6ToByte(g); 40 int gg = conv6ToByte(g);
41 for (int b = 0; b < 6; b++) { 41 for (int b = 0; b < 6; b++) {
42 int bb = conv6ToByte(b); 42 int bb = conv6ToByte(b);
43 *colors++ = SkPreMultiplyARGB(0xFF, rr, gg, bb); 43 *colors++ = SkPreMultiplyARGB(0xFF, rr, gg, bb);
44 } 44 }
45 } 45 }
46 } 46 }
47 SkColorTable* ctable = new SkColorTable(storage, 216); 47 SkColorTable* ctable = new SkColorTable(storage, 216);
48 dst->allocPixels(SkImageInfo::Make(src.width(), src.height(), kIndex_8_SkCol orType, aType), 48 dst->allocPixels(SkImageInfo::Make(src.width(), src.height(), kIndex_8_SkCol orType, aType),
49 NULL, ctable); 49 nullptr, ctable);
50 ctable->unref(); 50 ctable->unref();
51 51
52 SkAutoLockPixels alps(src); 52 SkAutoLockPixels alps(src);
53 SkAutoLockPixels alpd(*dst); 53 SkAutoLockPixels alpd(*dst);
54 54
55 for (int y = 0; y < src.height(); y++) { 55 for (int y = 0; y < src.height(); y++) {
56 const SkPMColor* srcP = src.getAddr32(0, y); 56 const SkPMColor* srcP = src.getAddr32(0, y);
57 uint8_t* dstP = dst->getAddr8(0, y); 57 uint8_t* dstP = dst->getAddr8(0, y);
58 for (int x = src.width() - 1; x >= 0; --x) { 58 for (int x = src.width() - 1; x >= 0; --x) {
59 *dstP++ = compute666Index(*srcP++); 59 *dstP++ = compute666Index(*srcP++);
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, t rue, false, kScale_Flag | kRotate_Flag | kBilerp_Flag); ) 381 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, t rue, false, kScale_Flag | kRotate_Flag | kBilerp_Flag); )
382 382
383 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f alse, false, kScale_Flag | kBilerp_Flag | kBicubic_Flag); ) 383 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f alse, false, kScale_Flag | kBilerp_Flag | kBicubic_Flag); )
384 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f alse, false, kScale_Flag | kRotate_Flag | kBilerp_Flag | kBicubic_Flag); ) 384 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f alse, false, kScale_Flag | kRotate_Flag | kBilerp_Flag | kBicubic_Flag); )
385 385
386 // source alpha tests -> S32A_Opaque_BlitRow32_{arm,neon} 386 // source alpha tests -> S32A_Opaque_BlitRow32_{arm,neon}
387 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kOpaque_Sou rceAlpha, kN32_SkColorType); ) 387 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kOpaque_Sou rceAlpha, kN32_SkColorType); )
388 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTransparen t_SourceAlpha, kN32_SkColorType); ) 388 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTransparen t_SourceAlpha, kN32_SkColorType); )
389 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTwoStripes _SourceAlpha, kN32_SkColorType); ) 389 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTwoStripes _SourceAlpha, kN32_SkColorType); )
390 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kThreeStrip es_SourceAlpha, kN32_SkColorType); ) 390 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kThreeStrip es_SourceAlpha, kN32_SkColorType); )
OLDNEW
« no previous file with comments | « bench/BezierBench.cpp ('k') | bench/BlurImageFilterBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698