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

Side by Side Diff: samplecode/SampleBitmapRect.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/SampleBigGradient.cpp ('k') | samplecode/SampleBlur.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 "SkAnimTimer.h" 9 #include "SkAnimTimer.h"
10 #include "SkView.h" 10 #include "SkView.h"
(...skipping 19 matching lines...) Expand all
30 30
31 static void make_bitmap(SkBitmap* bitmap) { 31 static void make_bitmap(SkBitmap* bitmap) {
32 bitmap->allocN32Pixels(INT_SIZE, INT_SIZE); 32 bitmap->allocN32Pixels(INT_SIZE, INT_SIZE);
33 SkCanvas canvas(*bitmap); 33 SkCanvas canvas(*bitmap);
34 34
35 canvas.drawColor(SK_ColorRED); 35 canvas.drawColor(SK_ColorRED);
36 SkPaint paint; 36 SkPaint paint;
37 paint.setAntiAlias(true); 37 paint.setAntiAlias(true);
38 const SkPoint pts[] = { { 0, 0 }, { SCALAR_SIZE, SCALAR_SIZE } }; 38 const SkPoint pts[] = { { 0, 0 }, { SCALAR_SIZE, SCALAR_SIZE } };
39 const SkColor colors[] = { SK_ColorWHITE, SK_ColorBLUE }; 39 const SkColor colors[] = { SK_ColorWHITE, SK_ColorBLUE };
40 paint.setShader(SkGradientShader::CreateLinear(pts, colors, NULL, 2, 40 paint.setShader(SkGradientShader::CreateLinear(pts, colors, nullptr, 2,
41 SkShader::kClamp_TileMode))-> unref(); 41 SkShader::kClamp_TileMode))-> unref();
42 canvas.drawCircle(SCALAR_SIZE/2, SCALAR_SIZE/2, SCALAR_SIZE/2, paint); 42 canvas.drawCircle(SCALAR_SIZE/2, SCALAR_SIZE/2, SCALAR_SIZE/2, paint);
43 } 43 }
44 44
45 static SkPoint unit_vec(int degrees) { 45 static SkPoint unit_vec(int degrees) {
46 SkScalar rad = SkDegreesToRadians(SkIntToScalar(degrees)); 46 SkScalar rad = SkDegreesToRadians(SkIntToScalar(degrees));
47 SkScalar s, c; 47 SkScalar s, c;
48 s = SkScalarSinCos(rad, &c); 48 s = SkScalarSinCos(rad, &c);
49 return SkPoint::Make(c, s); 49 return SkPoint::Make(c, s);
50 } 50 }
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 private: 244 private:
245 typedef SampleView INHERITED; 245 typedef SampleView INHERITED;
246 }; 246 };
247 247
248 ////////////////////////////////////////////////////////////////////////////// 248 //////////////////////////////////////////////////////////////////////////////
249 249
250 static SkView* F0() { return new BitmapRectView; } 250 static SkView* F0() { return new BitmapRectView; }
251 static SkView* F1() { return new BitmapRectView2; } 251 static SkView* F1() { return new BitmapRectView2; }
252 static SkViewRegister gR0(F0); 252 static SkViewRegister gR0(F0);
253 static SkViewRegister gR1(F1); 253 static SkViewRegister gR1(F1);
OLDNEW
« no previous file with comments | « samplecode/SampleBigGradient.cpp ('k') | samplecode/SampleBlur.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698