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

Side by Side Diff: samplecode/SampleFilter.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 | « samplecode/SampleFatBits.cpp ('k') | samplecode/SampleFilter2.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 /* 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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 12 matching lines...) Expand all
23 #include "sk_tool_utils.h" 23 #include "sk_tool_utils.h"
24 24
25 static void make_bm(SkBitmap* bm) { 25 static void make_bm(SkBitmap* bm) {
26 const SkPMColor colors[] = { 26 const SkPMColor colors[] = {
27 SkPreMultiplyColor(SK_ColorRED), SkPreMultiplyColor(SK_ColorGREEN), 27 SkPreMultiplyColor(SK_ColorRED), SkPreMultiplyColor(SK_ColorGREEN),
28 SkPreMultiplyColor(SK_ColorBLUE), SkPreMultiplyColor(SK_ColorWHITE) 28 SkPreMultiplyColor(SK_ColorBLUE), SkPreMultiplyColor(SK_ColorWHITE)
29 }; 29 };
30 SkColorTable* ctable = new SkColorTable(colors, 4); 30 SkColorTable* ctable = new SkColorTable(colors, 4);
31 bm->allocPixels(SkImageInfo::Make(2, 2, kIndex_8_SkColorType, 31 bm->allocPixels(SkImageInfo::Make(2, 2, kIndex_8_SkColorType,
32 kOpaque_SkAlphaType), 32 kOpaque_SkAlphaType),
33 NULL, ctable); 33 nullptr, ctable);
34 ctable->unref(); 34 ctable->unref();
35 35
36 *bm->getAddr8(0, 0) = 0; 36 *bm->getAddr8(0, 0) = 0;
37 *bm->getAddr8(1, 0) = 1; 37 *bm->getAddr8(1, 0) = 1;
38 *bm->getAddr8(0, 1) = 2; 38 *bm->getAddr8(0, 1) = 2;
39 *bm->getAddr8(1, 1) = 3; 39 *bm->getAddr8(1, 1) = 3;
40 } 40 }
41 41
42 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm, 42 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm,
43 SkScalar x, SkScalar y, SkPaint* paint) { 43 SkScalar x, SkScalar y, SkPaint* paint) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 private: 115 private:
116 typedef SampleView INHERITED; 116 typedef SampleView INHERITED;
117 }; 117 };
118 118
119 ////////////////////////////////////////////////////////////////////////////// 119 //////////////////////////////////////////////////////////////////////////////
120 120
121 static SkView* MyFactory() { return new FilterView; } 121 static SkView* MyFactory() { return new FilterView; }
122 static SkViewRegister reg(MyFactory); 122 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleFatBits.cpp ('k') | samplecode/SampleFilter2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698