Index: samplecode/SampleAll.cpp |
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp |
index 667bcc30543127ba47ecdf821c569a93a4d15b95..628504d90d9498f1e43d3b65f93df03850cb5fcf 100644 |
--- a/samplecode/SampleAll.cpp |
+++ b/samplecode/SampleAll.cpp |
@@ -84,7 +84,7 @@ static void r0(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) { |
SkBlurMaskFilter::kNone_BlurFlag))->unref(); |
rastBuilder->addLayer(p, SkIntToScalar(3), SkIntToScalar(3)); |
- p.setMaskFilter(NULL); |
+ p.setMaskFilter(nullptr); |
p.setStyle(SkPaint::kStroke_Style); |
p.setStrokeWidth(SK_Scalar1); |
rastBuilder->addLayer(p); |
@@ -135,7 +135,7 @@ static void r4(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) { |
p.setXfermodeMode(SkXfermode::kClear_Mode); |
rastBuilder->addLayer(p, SK_Scalar1*3/2, SK_Scalar1*3/2); |
- p.setXfermode(NULL); |
+ p.setXfermode(nullptr); |
rastBuilder->addLayer(p); |
} |
@@ -199,8 +199,8 @@ static void r8(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) { |
p.setXfermodeMode(SkXfermode::kClear_Mode); |
rastBuilder->addLayer(p); |
- p.setPathEffect(NULL); |
- p.setXfermode(NULL); |
+ p.setPathEffect(nullptr); |
+ p.setXfermode(nullptr); |
p.setStyle(SkPaint::kStroke_Style); |
p.setStrokeWidth(SK_Scalar1); |
rastBuilder->addLayer(p); |
@@ -216,8 +216,8 @@ static void r9(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) { |
p.setXfermodeMode(SkXfermode::kClear_Mode); |
rastBuilder->addLayer(p); |
- p.setPathEffect(NULL); |
- p.setXfermode(NULL); |
+ p.setPathEffect(nullptr); |
+ p.setXfermode(nullptr); |
p.setStyle(SkPaint::kStroke_Style); |
p.setStrokeWidth(SK_Scalar1); |
rastBuilder->addLayer(p); |
@@ -303,7 +303,7 @@ protected: |
{ |
SkPictureRecorder recorder; |
{ |
- SkCanvas* record = recorder.beginRecording(320, 480, NULL, 0); |
+ SkCanvas* record = recorder.beginRecording(320, 480, nullptr, 0); |
this->drawPicture(record, 120); |
} |
SkAutoTUnref<SkPicture> picture(recorder.endRecording()); |
@@ -359,7 +359,7 @@ protected: |
// shaders |
SkPoint linearPoints[] = { { 0, 0, }, { SkIntToScalar(40), SkIntToScalar(40) } }; |
SkColor linearColors[] = { SK_ColorRED, SK_ColorBLUE }; |
- SkScalar* linearPos = NULL; |
+ SkScalar* linearPos = nullptr; |
int linearCount = 2; |
SkShader::TileMode linearMode = SkShader::kMirror_TileMode; |
SkShader* linear = SkGradientShader::CreateLinear(linearPoints, |
@@ -409,8 +409,8 @@ protected: |
paint.setXfermode(xfermode)->unref(); |
paint.setColorFilter(lightingFilter)->unref(); |
canvas->drawLine(start.fX, start.fY, stop.fX, stop.fY, paint); // should not be green |
- paint.setXfermode(NULL); |
- paint.setColorFilter(NULL); |
+ paint.setXfermode(nullptr); |
+ paint.setColorFilter(nullptr); |
// rectangle |
paint.setStyle(SkPaint::kFill_Style); |
@@ -419,7 +419,7 @@ protected: |
paint.setShader(linear)->unref(); |
paint.setPathEffect(pathEffectTest())->unref(); |
canvas->drawRect(rect, paint); |
- paint.setPathEffect(NULL); |
+ paint.setPathEffect(nullptr); |
// circle w/ emboss & transparent (exercises 3dshader) |
canvas->translate(SkIntToScalar(50), 0); |
@@ -436,10 +436,10 @@ protected: |
paint.setStyle(SkPaint::kStroke_Style); |
paint.setStrokeWidth(SkIntToScalar(5)); |
paint.setShader(radial)->unref(); |
- paint.setMaskFilter(NULL); |
+ paint.setMaskFilter(nullptr); |
canvas->drawPath(path, paint); |
- paint.setShader(NULL); |
+ paint.setShader(nullptr); |
// bitmap, sprite |
canvas->translate(SkIntToScalar(50), 0); |
paint.setStyle(SkPaint::kFill_Style); |
@@ -452,7 +452,7 @@ protected: |
canvas->translate(-SkIntToScalar(30), SkIntToScalar(30)); |
paint.setShader(shaderTest())->unref(); // test compose shader |
canvas->drawRect(rect2, paint); |
- paint.setShader(NULL); |
+ paint.setShader(nullptr); |
canvas->restore(); |
// text |
@@ -482,7 +482,7 @@ protected: |
virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) { |
fClickPt.set(x, y); |
- this->inval(NULL); |
+ this->inval(nullptr); |
return this->INHERITED::onFindClickHandler(x, y, modi); |
} |
@@ -508,11 +508,11 @@ protected: |
SkShader* shaderTest() { |
SkPoint pts[] = { { 0, 0, }, { SkIntToScalar(100), 0 } }; |
SkColor colors[] = { SK_ColorRED, SK_ColorBLUE }; |
- SkShader* shaderA = SkGradientShader::CreateLinear(pts, colors, NULL, |
+ SkShader* shaderA = SkGradientShader::CreateLinear(pts, colors, nullptr, |
2, SkShader::kClamp_TileMode); |
pts[1].set(0, SkIntToScalar(100)); |
SkColor colors2[] = {SK_ColorBLACK, SkColorSetARGB(0x80, 0, 0, 0)}; |
- SkShader* shaderB = SkGradientShader::CreateLinear(pts, colors2, NULL, |
+ SkShader* shaderB = SkGradientShader::CreateLinear(pts, colors2, nullptr, |
2, SkShader::kClamp_TileMode); |
SkXfermode* mode = SkXfermode::Create(SkXfermode::kDstIn_Mode); |
SkShader* result = new SkComposeShader(shaderA, shaderB, mode); |
@@ -550,7 +550,7 @@ protected: |
for (size_t i = 0; i < SK_ARRAY_COUNT(gRastProcs); i++) { |
apply_shader(&paint, (int)i); |
- // paint.setMaskFilter(NULL); |
+ // paint.setMaskFilter(nullptr); |
// paint.setColor(SK_ColorBLACK); |
#if 01 |