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

Unified Diff: src/animator/SkDrawExtraPathEffect.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 | « src/animator/SkDrawEmboss.cpp ('k') | src/animator/SkDrawGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkDrawExtraPathEffect.cpp
diff --git a/src/animator/SkDrawExtraPathEffect.cpp b/src/animator/SkDrawExtraPathEffect.cpp
index 68b5006ed32468c0dd445a73fb659192a11a74f2..4fa76c65c9a1dedd00bcdb6d5d0eb1690b13c13e 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) {
}
« no previous file with comments | « src/animator/SkDrawEmboss.cpp ('k') | src/animator/SkDrawGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698