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

Unified Diff: src/gpu/GrStencilAndCoverTextContext.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/gpu/GrStencilAndCoverPathRenderer.cpp ('k') | src/gpu/GrStrokeInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStencilAndCoverTextContext.cpp
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp
index d63df88e83ae0a2a0be7bd389b53a4d41ada765e..78c3a2a8df53356d683b6cfc1a91c8c030da8bdb 100644
--- a/src/gpu/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/GrStencilAndCoverTextContext.cpp
@@ -55,7 +55,7 @@ bool GrStencilAndCoverTextContext::canDraw(const GrRenderTarget* rt,
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 @@ bool GrStencilAndCoverTextContext::canDraw(const GrRenderTarget* rt,
// 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 @@ void GrStencilAndCoverTextContext::onDrawText(GrRenderTarget* rt,
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 @@ void GrStencilAndCoverTextContext::onDrawPosText(GrRenderTarget* rt,
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 @@ static GrPathRange* get_gr_glyphs(GrContext* ctx,
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 @@ void GrStencilAndCoverTextContext::init(GrRenderTarget* rt,
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 @@ void GrStencilAndCoverTextContext::finish() {
this->flush();
fGlyphs->unref();
- fGlyphs = NULL;
+ fGlyphs = nullptr;
SkGlyphCache::AttachCache(fGlyphCache);
- fGlyphCache = NULL;
+ fGlyphCache = nullptr;
fViewMatrix = fContextInitialMatrix;
}
« no previous file with comments | « src/gpu/GrStencilAndCoverPathRenderer.cpp ('k') | src/gpu/GrStrokeInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698