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

Side by Side Diff: samplecode/SampleLines.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/SampleLighting.cpp ('k') | samplecode/SampleLua.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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 paint.setStyle(SkPaint::kStroke_Style); 58 paint.setStyle(SkPaint::kStroke_Style);
59 paint.setStrokeWidth(SkScalarHalf(SkIntToScalar(3))); 59 paint.setStrokeWidth(SkScalarHalf(SkIntToScalar(3)));
60 paint.setColor(0xFFFF8800); 60 paint.setColor(0xFFFF8800);
61 // paint.setColor(0xFFFFFFFF); 61 // paint.setColor(0xFFFFFFFF);
62 canvas->drawRect(r, paint); 62 canvas->drawRect(r, paint);
63 } 63 }
64 64
65 void onDrawContent(SkCanvas* canvas) override { 65 void onDrawContent(SkCanvas* canvas) override {
66 SkBitmap bm; 66 SkBitmap bm;
67 SkImageDecoder::DecodeFile("/kill.gif", &bm); 67 SkImageDecoder::DecodeFile("/kill.gif", &bm);
68 canvas->drawBitmap(bm, 0, 0, NULL); 68 canvas->drawBitmap(bm, 0, 0, nullptr);
69 69
70 this->drawRings(canvas); 70 this->drawRings(canvas);
71 return; 71 return;
72 72
73 SkPaint paint; 73 SkPaint paint;
74 74
75 // fAlpha = 0x80; 75 // fAlpha = 0x80;
76 paint.setColor(SK_ColorWHITE); 76 paint.setColor(SK_ColorWHITE);
77 paint.setAlpha(fAlpha & 0xFF); 77 paint.setAlpha(fAlpha & 0xFF);
78 SkRect r; 78 SkRect r;
(...skipping 12 matching lines...) Expand all
91 91
92 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt); 92 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt);
93 93
94 paint.setAntiAlias(true); // with anti-aliasing 94 paint.setAntiAlias(true); // with anti-aliasing
95 y += SkIntToScalar(10); 95 y += SkIntToScalar(10);
96 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt); 96 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt);
97 } 97 }
98 98
99 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override { 99 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override {
100 fAlpha = SkScalarRoundToInt(y); 100 fAlpha = SkScalarRoundToInt(y);
101 this->inval(NULL); 101 this->inval(nullptr);
102 return NULL; 102 return nullptr;
103 } 103 }
104 private: 104 private:
105 105
106 int fAlpha; 106 int fAlpha;
107 typedef SampleView INHERITED; 107 typedef SampleView INHERITED;
108 }; 108 };
109 109
110 ////////////////////////////////////////////////////////////////////////////// 110 //////////////////////////////////////////////////////////////////////////////
111 111
112 static SkView* MyFactory() { return new LinesView; } 112 static SkView* MyFactory() { return new LinesView; }
113 static SkViewRegister reg(MyFactory); 113 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleLighting.cpp ('k') | samplecode/SampleLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698