aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/animator/SkDrawExtraPathEffect.cpp
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-08-27 07:41:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-27 07:41:16 -0700
commit96fcdcc219d2a0d3579719b84b28bede76efba64 (patch)
tree0ec5ea0193d8292df8bf5ed9dd8498a5eb5763dd /src/animator/SkDrawExtraPathEffect.cpp
parent435af2f736c85c3274a0c6760a3523810750d237 (diff)
Style Change: NULL->nullptr
Diffstat (limited to 'src/animator/SkDrawExtraPathEffect.cpp')
-rw-r--r--src/animator/SkDrawExtraPathEffect.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/animator/SkDrawExtraPathEffect.cpp b/src/animator/SkDrawExtraPathEffect.cpp
index 68b5006ed3..4fa76c65c9 100644
--- a/src/animator/SkDrawExtraPathEffect.cpp
+++ b/src/animator/SkDrawExtraPathEffect.cpp
@@ -90,12 +90,12 @@ public:
}
// For serialization. This will never be called.
- Factory getFactory() const override { sk_throw(); return NULL; }
+ Factory getFactory() const override { sk_throw(); return nullptr; }
protected:
SkScalar begin(SkScalar contourLength) const override {
SkScriptValue value;
- SkAnimatorScript engine(*fMaker, NULL, SkType_Float);
+ SkAnimatorScript engine(*fMaker, nullptr, SkType_Float);
engine.propertyCallBack(GetContourLength, &contourLength);
value.fOperand.fScalar = 0;
engine.evaluate(fDraw->phase.c_str(), &value, SkType_Float);
@@ -104,7 +104,7 @@ protected:
SkScalar next(SkPath* dst, SkScalar distance, SkPathMeasure&) const override {
fMaker->setExtraPropertyCallBack(fDraw->fType, GetDistance, &distance);
- SkDrawPath* drawPath = NULL;
+ SkDrawPath* drawPath = nullptr;
if (fDraw->addPath->isPath()) {
drawPath = (SkDrawPath*) fDraw->addPath;
} else {
@@ -132,7 +132,7 @@ protected:
}
}
SkScalar result = 0;
- SkAnimatorScript::EvaluateFloat(*fMaker, NULL, fDraw->spacing.c_str(), &result);
+ SkAnimatorScript::EvaluateFloat(*fMaker, nullptr, fDraw->spacing.c_str(), &result);
if (drawPath)
dst->addPath(drawPath->getPath(), m);
fMaker->clearExtraPropertyCallBack(fDraw->fType);
@@ -185,7 +185,7 @@ const SkMemberInfo SkDrawShapePathEffect::fInfo[] = {
DEFINE_GET_MEMBER(SkDrawShapePathEffect);
SkDrawShapePathEffect::SkDrawShapePathEffect() :
- addPath(NULL), addMatrix(NULL), path(NULL), fPathEffect(NULL) {
+ addPath(nullptr), addMatrix(nullptr), path(nullptr), fPathEffect(nullptr) {
}
SkDrawShapePathEffect::~SkDrawShapePathEffect() {
@@ -223,7 +223,7 @@ SkDrawShape1DPathEffect::~SkDrawShape1DPathEffect() {
}
void SkDrawShape1DPathEffect::onEndElement(SkAnimateMaker& maker) {
- if (addPath == NULL || (addPath->isPath() == false && addPath->isApply() == false))
+ if (addPath == nullptr || (addPath->isPath() == false && addPath->isApply() == false))
maker.setErrorCode(SkDisplayXMLParserError::kUnknownError); // !!! add error
else
fPathEffect = new SkShape1DPathEffect(this, &maker);
@@ -238,7 +238,7 @@ public:
}
// For serialization. This will never be called.
- Factory getFactory() const override { sk_throw(); return NULL; }
+ Factory getFactory() const override { sk_throw(); return nullptr; }
protected:
void begin(const SkIRect& uvBounds, SkPath*) const override {
@@ -270,7 +270,7 @@ private:
apply->interpolate(*fMaker, v);
drawPath = (SkDrawPath*) apply->getScope();
}
- if (drawPath == NULL)
+ if (drawPath == nullptr)
goto clearCallBack;
if (fDraw->matrix) {
SkDrawMatrix* matrix;
@@ -341,8 +341,8 @@ SkDrawShape2DPathEffect::~SkDrawShape2DPathEffect() {
}
void SkDrawShape2DPathEffect::onEndElement(SkAnimateMaker& maker) {
- if (addPath == NULL || (addPath->isPath() == false && addPath->isApply() == false) ||
- matrix == NULL)
+ if (addPath == nullptr || (addPath->isPath() == false && addPath->isApply() == false) ||
+ matrix == nullptr)
maker.setErrorCode(SkDisplayXMLParserError::kUnknownError); // !!! add error
else
fPathEffect = new SkShape2DPathEffect(this, &maker, matrix->getMatrix());
@@ -362,7 +362,7 @@ const SkMemberInfo SkDrawComposePathEffect::fInfo[] = {
DEFINE_GET_MEMBER(SkDrawComposePathEffect);
SkDrawComposePathEffect::SkDrawComposePathEffect(SkDisplayTypes type) : fType(type),
- effect1(NULL), effect2(NULL) {
+ effect1(nullptr), effect2(nullptr) {
}
SkDrawComposePathEffect::~SkDrawComposePathEffect() {
@@ -371,7 +371,7 @@ SkDrawComposePathEffect::~SkDrawComposePathEffect() {
}
bool SkDrawComposePathEffect::addChild(SkAnimateMaker& , SkDisplayable* child) {
- if (effect1 == NULL)
+ if (effect1 == nullptr)
effect1 = (SkDrawPathEffect*) child;
else
effect2 = (SkDrawPathEffect*) child;
@@ -433,7 +433,7 @@ public:
}
virtual SkDisplayable* createInstance(SkDisplayTypes type) {
- SkDisplayable* result = NULL;
+ SkDisplayable* result = nullptr;
if (skDrawShape1DPathEffectType == type)
result = new SkDrawShape1DPathEffect(type);
else if (skDrawShape2DPathEffectType == type)
@@ -454,7 +454,7 @@ public:
#if SK_USE_CONDENSED_INFO == 0
virtual const SkMemberInfo* getMembers(SkDisplayTypes type, int* infoCountPtr) {
- const SkMemberInfo* info = NULL;
+ const SkMemberInfo* info = nullptr;
int infoCount = 0;
if (skDrawShape1DPathEffectType == type) {
info = SkDrawShape1DPathEffect::fInfo;
@@ -485,12 +485,12 @@ public:
return kDrawComposePathEffectName;
else if (skDrawCornerPathEffectType == type)
return kDrawCornerPathEffectName;
- return NULL;
+ return nullptr;
}
#endif
virtual SkDisplayTypes getType(const char name[], size_t len ) {
- SkDisplayTypes* type = NULL;
+ SkDisplayTypes* type = nullptr;
if (SK_LITERAL_STR_EQUAL(kDrawShape1DPathEffectName, name, len))
type = &skDrawShape1DPathEffectType;
else if (SK_LITERAL_STR_EQUAL(kDrawShape2DPathEffectName, name, len))
@@ -521,5 +521,5 @@ void InitializeSkExtraPathEffects(SkAnimator* animator) {
////////////////
-SkExtras::SkExtras() : fExtraCallBack(NULL), fExtraStorage(NULL) {
+SkExtras::SkExtras() : fExtraCallBack(nullptr), fExtraStorage(nullptr) {
}