diff options
author | 2015-08-27 07:41:13 -0700 | |
---|---|---|
committer | 2015-08-27 07:41:16 -0700 | |
commit | 96fcdcc219d2a0d3579719b84b28bede76efba64 (patch) | |
tree | 0ec5ea0193d8292df8bf5ed9dd8498a5eb5763dd /samplecode/SamplePatch.cpp | |
parent | 435af2f736c85c3274a0c6760a3523810750d237 (diff) |
Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
Diffstat (limited to 'samplecode/SamplePatch.cpp')
-rw-r--r-- | samplecode/SamplePatch.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/samplecode/SamplePatch.cpp b/samplecode/SamplePatch.cpp index 9ada9ef68c..dc3e9df086 100644 --- a/samplecode/SamplePatch.cpp +++ b/samplecode/SamplePatch.cpp @@ -42,7 +42,7 @@ static SkShader* make_shader1(const SkIPoint& size) { SkPoint pts[] = { { 0, 0, }, { SkIntToScalar(size.fX), SkIntToScalar(size.fY) } }; SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE, SK_ColorRED }; - return SkGradientShader::CreateLinear(pts, colors, NULL, + return SkGradientShader::CreateLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors), SkShader::kMirror_TileMode); } @@ -74,7 +74,7 @@ static void eval_patch_edge(const SkPoint cubic[], SkPoint samples[], int segs) samples[0] = cubic[0]; for (int i = 1; i < segs; i++) { t += dt; - SkEvalCubicAt(cubic, t, &samples[i], NULL, NULL); + SkEvalCubicAt(cubic, t, &samples[i], nullptr, nullptr); } } @@ -199,9 +199,9 @@ void Patch::draw(SkCanvas* canvas, const SkPaint& paint, int nu, int nv, } t += dt; canvas->drawVertices(SkCanvas::kTriangleStrip_VertexMode, stripCount, - strip, doTextures ? tex : NULL, - doColors ? colors : NULL, NULL, - NULL, 0, paint); + strip, doTextures ? tex : nullptr, + doColors ? colors : nullptr, nullptr, + nullptr, 0, paint); } } @@ -294,7 +294,7 @@ protected: patch.setPatch(fPts); drawpatches(canvas, paint, nu, nv, &patch); - paint.setShader(NULL); + paint.setShader(nullptr); paint.setAntiAlias(true); paint.setStrokeWidth(SkIntToScalar(5)); canvas->drawPoints(SkCanvas::kPoints_PointMode, SK_ARRAY_COUNT(fPts), fPts, paint); @@ -347,7 +347,7 @@ protected: bool onClick(Click* click) override { fPts[((PtClick*)click)->fIndex].set(click->fCurr.fX - DX, click->fCurr.fY - DY); - this->inval(NULL); + this->inval(nullptr); return true; } |