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

Side by Side Diff: samplecode/SampleLayerMask.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/SampleIdentityScale.cpp ('k') | samplecode/SampleLayers.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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 p.addOval(r); 51 p.addOval(r);
52 p.setFillType(SkPath::kInverseWinding_FillType); 52 p.setFillType(SkPath::kInverseWinding_FillType);
53 paint.setXfermodeMode(SkXfermode::kDstOut_Mode); 53 paint.setXfermodeMode(SkXfermode::kDstOut_Mode);
54 canvas->drawPath(p, paint); 54 canvas->drawPath(p, paint);
55 } 55 }
56 } 56 }
57 57
58 virtual void onDrawContent(SkCanvas* canvas) { 58 virtual void onDrawContent(SkCanvas* canvas) {
59 SkRect r; 59 SkRect r;
60 r.set(SkIntToScalar(20), SkIntToScalar(20), SkIntToScalar(120), SkIntToS calar(120)); 60 r.set(SkIntToScalar(20), SkIntToScalar(20), SkIntToScalar(120), SkIntToS calar(120));
61 canvas->saveLayer(&r, NULL); 61 canvas->saveLayer(&r, nullptr);
62 canvas->drawColor(SK_ColorRED); 62 canvas->drawColor(SK_ColorRED);
63 drawMask(canvas, r); 63 drawMask(canvas, r);
64 canvas->restore(); 64 canvas->restore();
65 } 65 }
66 66
67 private: 67 private:
68 typedef SampleView INHERITED; 68 typedef SampleView INHERITED;
69 }; 69 };
70 70
71 /////////////////////////////////////////////////////////////////////////////// 71 ///////////////////////////////////////////////////////////////////////////////
72 72
73 static SkView* MyFactory() { return new LayerMaskView; } 73 static SkView* MyFactory() { return new LayerMaskView; }
74 static SkViewRegister reg(MyFactory); 74 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleIdentityScale.cpp ('k') | samplecode/SampleLayers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698