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

Unified Diff: samplecode/SamplePatch.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleMeasure.cpp ('k') | samplecode/SamplePath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SamplePatch.cpp
diff --git a/samplecode/SamplePatch.cpp b/samplecode/SamplePatch.cpp
index 9ada9ef68c0efeac68cd553d198ddc41812b6f74..dc3e9df086a4c202e01b1861237eaa8191e1a028 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;
}
« no previous file with comments | « samplecode/SampleMeasure.cpp ('k') | samplecode/SamplePath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698