Index: src/core/SkScalerContext.cpp |
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp |
index 5f0f653ec69d813ebc2732327a6bb46bd6d42cc0..70a9c30e3a34109e07e58344939d7b0369d0dc90 100644 |
--- a/src/core/SkScalerContext.cpp |
+++ b/src/core/SkScalerContext.cpp |
@@ -63,7 +63,7 @@ void SkGlyph::zeroMetrics() { |
static SkFlattenable* load_flattenable(const SkDescriptor* desc, uint32_t tag, |
SkFlattenable::Type ft) { |
- SkFlattenable* obj = NULL; |
+ SkFlattenable* obj = nullptr; |
uint32_t len; |
const void* data = desc->findEntry(tag, &len); |
@@ -76,7 +76,7 @@ static SkFlattenable* load_flattenable(const SkDescriptor* desc, uint32_t tag, |
} |
SkScalerContext::SkScalerContext(SkTypeface* typeface, const SkDescriptor* desc) |
- : fRec(*static_cast<const Rec*>(desc->findEntry(kRec_SkDescriptorTag, NULL))) |
+ : fRec(*static_cast<const Rec*>(desc->findEntry(kRec_SkDescriptorTag, nullptr))) |
, fTypeface(SkRef(typeface)) |
, fPathEffect(static_cast<SkPathEffect*>(load_flattenable(desc, kPathEffect_SkDescriptorTag, |
@@ -86,7 +86,7 @@ SkScalerContext::SkScalerContext(SkTypeface* typeface, const SkDescriptor* desc) |
, fRasterizer(static_cast<SkRasterizer*>(load_flattenable(desc, kRasterizer_SkDescriptorTag, |
SkFlattenable::kSkRasterizer_Type))) |
// Initialize based on our settings. Subclasses can also force this. |
- , fGenerateImageFromPath(fRec.fFrameWidth > 0 || fPathEffect != NULL || fRasterizer != NULL) |
+ , fGenerateImageFromPath(fRec.fFrameWidth > 0 || fPathEffect != nullptr || fRasterizer != nullptr) |
, fPreBlend(fMaskFilter ? SkMaskGamma::PreBlend() : SkScalerContext::GetMaskPreBlend(fRec)) |
, fPreBlendForFilter(fMaskFilter ? SkScalerContext::GetMaskPreBlend(fRec) |
@@ -103,8 +103,8 @@ SkScalerContext::SkScalerContext(SkTypeface* typeface, const SkDescriptor* desc) |
rec->fFrameWidth, rec->fMiterLimit, rec->fHints, rec->fFrameAndFill, |
rec->fMaskFormat, rec->fStrokeJoin); |
SkDebugf(" pathEffect %x maskFilter %x\n", |
- desc->findEntry(kPathEffect_SkDescriptorTag, NULL), |
- desc->findEntry(kMaskFilter_SkDescriptorTag, NULL)); |
+ desc->findEntry(kPathEffect_SkDescriptorTag, nullptr), |
+ desc->findEntry(kMaskFilter_SkDescriptorTag, nullptr)); |
#endif |
} |
@@ -154,7 +154,7 @@ void SkScalerContext::getMetrics(SkGlyph* glyph) { |
if (fRasterizer) { |
SkMask mask; |
- if (fRasterizer->rasterize(fillPath, fillToDevMatrix, NULL, |
+ if (fRasterizer->rasterize(fillPath, fillToDevMatrix, nullptr, |
fMaskFilter, &mask, |
SkMask::kJustComputeBounds_CreateMode)) { |
glyph->fLeft = mask.fBounds.fLeft; |
@@ -206,12 +206,12 @@ void SkScalerContext::getMetrics(SkGlyph* glyph) { |
glyph->toMask(&src); |
fRec.getMatrixFrom2x2(&matrix); |
- src.fImage = NULL; // only want the bounds from the filter |
- if (fMaskFilter->filterMask(&dst, src, matrix, NULL)) { |
+ src.fImage = nullptr; // only want the bounds from the filter |
+ if (fMaskFilter->filterMask(&dst, src, matrix, nullptr)) { |
if (dst.fBounds.isEmpty() || !dst.fBounds.is16Bit()) { |
goto SK_ERROR; |
} |
- SkASSERT(dst.fImage == NULL); |
+ SkASSERT(dst.fImage == nullptr); |
glyph->fLeft = dst.fBounds.fLeft; |
glyph->fTop = dst.fBounds.fTop; |
glyph->fWidth = SkToU16(dst.fBounds.width()); |
@@ -485,7 +485,7 @@ void SkScalerContext::getImage(const SkGlyph& origGlyph) { |
// need the original bounds, sans our maskfilter |
SkMaskFilter* mf = fMaskFilter; |
- fMaskFilter = NULL; // temp disable |
+ fMaskFilter = nullptr; // temp disable |
this->getMetrics(&tmpGlyph); |
fMaskFilter = mf; // restore |
@@ -514,7 +514,7 @@ void SkScalerContext::getImage(const SkGlyph& origGlyph) { |
mask.fFormat = SkMask::kA8_Format; |
sk_bzero(glyph->fImage, mask.computeImageSize()); |
- if (!fRasterizer->rasterize(fillPath, fillToDevMatrix, NULL, |
+ if (!fRasterizer->rasterize(fillPath, fillToDevMatrix, nullptr, |
fMaskFilter, &mask, |
SkMask::kJustRenderImage_CreateMode)) { |
return; |
@@ -553,7 +553,7 @@ void SkScalerContext::getImage(const SkGlyph& origGlyph) { |
fRec.getMatrixFrom2x2(&matrix); |
- if (fMaskFilter->filterMask(&dstM, srcM, matrix, NULL)) { |
+ if (fMaskFilter->filterMask(&dstM, srcM, matrix, nullptr)) { |
int width = SkFastMin32(origGlyph.fWidth, dstM.fBounds.width()); |
int height = SkFastMin32(origGlyph.fHeight, dstM.fBounds.height()); |
int dstRB = origGlyph.rowBytes(); |
@@ -585,7 +585,7 @@ void SkScalerContext::getImage(const SkGlyph& origGlyph) { |
} |
void SkScalerContext::getPath(const SkGlyph& glyph, SkPath* path) { |
- this->internalGetPath(glyph, NULL, path, NULL); |
+ this->internalGetPath(glyph, nullptr, path, nullptr); |
} |
void SkScalerContext::getFontMetrics(SkPaint::FontMetrics* fm) { |
@@ -611,7 +611,7 @@ void SkScalerContext::internalGetPath(const SkGlyph& glyph, SkPath* fillPath, |
} |
} |
- if (fRec.fFrameWidth > 0 || fPathEffect != NULL) { |
+ if (fRec.fFrameWidth > 0 || fPathEffect != nullptr) { |
// need the path in user-space, with only the point-size applied |
// so that our stroking and effects will operate the same way they |
// would if the user had extracted the path themself, and then |
@@ -641,7 +641,7 @@ void SkScalerContext::internalGetPath(const SkGlyph& glyph, SkPath* fillPath, |
if (fPathEffect) { |
SkPath effectPath; |
- if (fPathEffect->filterPath(&effectPath, localPath, &rec, NULL)) { |
+ if (fPathEffect->filterPath(&effectPath, localPath, &rec, nullptr)) { |
localPath.swap(effectPath); |
} |
} |
@@ -668,7 +668,7 @@ void SkScalerContext::internalGetPath(const SkGlyph& glyph, SkPath* fillPath, |
fillToDevMatrix->reset(); |
} |
if (devPath) { |
- if (fillPath == NULL) { |
+ if (fillPath == nullptr) { |
devPath->swap(path); |
} else { |
*devPath = path; |