Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp
index d63df88..78c3a2a 100644
--- a/src/gpu/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/GrStencilAndCoverTextContext.cpp
@@ -55,7 +55,7 @@
return false;
}
if (SkPathEffect* pe = skPaint.getPathEffect()) {
- if (pe->asADash(NULL) != SkPathEffect::kDash_DashType) {
+ if (pe->asADash(nullptr) != SkPathEffect::kDash_DashType) {
return false;
}
}
@@ -69,7 +69,7 @@
// No color bitmap fonts.
SkScalerContext::Rec rec;
- SkScalerContext::MakeRec(skPaint, &fSurfaceProps, NULL, &rec);
+ SkScalerContext::MakeRec(skPaint, &fSurfaceProps, nullptr, &rec);
return rec.getFormat() != SkMask::kARGB32_Format;
}
@@ -82,9 +82,9 @@
size_t byteLength,
SkScalar x, SkScalar y,
const SkIRect& regionClipBounds) {
- SkASSERT(byteLength == 0 || text != NULL);
+ SkASSERT(byteLength == 0 || text != nullptr);
- if (text == NULL || byteLength == 0 /*|| fRC->isEmpty()*/) {
+ if (text == nullptr || byteLength == 0 /*|| fRC->isEmpty()*/) {
return;
}
@@ -177,11 +177,11 @@
int scalarsPerPosition,
const SkPoint& offset,
const SkIRect& regionClipBounds) {
- SkASSERT(byteLength == 0 || text != NULL);
+ SkASSERT(byteLength == 0 || text != nullptr);
SkASSERT(1 == scalarsPerPosition || 2 == scalarsPerPosition);
// nothing to draw
- if (text == NULL || byteLength == 0/* || fRC->isEmpty()*/) {
+ if (text == nullptr || byteLength == 0/* || fRC->isEmpty()*/) {
return;
}
@@ -237,11 +237,11 @@
SkAutoTUnref<GrPathRange> glyphs(
static_cast<GrPathRange*>(
ctx->resourceProvider()->findAndRefResourceByUniqueKey(glyphKey)));
- if (NULL == glyphs) {
+ if (nullptr == glyphs) {
glyphs.reset(ctx->resourceProvider()->createGlyphs(typeface, desc, stroke));
ctx->resourceProvider()->assignUniqueKeyToResource(glyphKey, glyphs);
} else {
- SkASSERT(NULL == desc || glyphs->isEqualTo(*desc));
+ SkASSERT(nullptr == desc || glyphs->isEqualTo(*desc));
}
return glyphs.detach();
@@ -371,9 +371,9 @@
fViewMatrix.preConcat(textMatrix);
fLocalMatrix = textMatrix;
- fGlyphCache = fSkPaint.detachCache(&fSurfaceProps, NULL, true /*ignoreGamma*/);
+ fGlyphCache = fSkPaint.detachCache(&fSurfaceProps, nullptr, true /*ignoreGamma*/);
fGlyphs = canUseRawPaths ?
- get_gr_glyphs(fContext, fSkPaint.getTypeface(), NULL, fStroke) :
+ get_gr_glyphs(fContext, fSkPaint.getTypeface(), nullptr, fStroke) :
get_gr_glyphs(fContext, fGlyphCache->getScalerContext()->getTypeface(),
&fGlyphCache->getDescriptor(), fStroke);
}
@@ -486,10 +486,10 @@
this->flush();
fGlyphs->unref();
- fGlyphs = NULL;
+ fGlyphs = nullptr;
SkGlyphCache::AttachCache(fGlyphCache);
- fGlyphCache = NULL;
+ fGlyphCache = nullptr;
fViewMatrix = fContextInitialMatrix;
}