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

Unified Diff: src/core/SkDevice.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/core/SkDescriptor.h ('k') | src/core/SkDeviceLooper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDevice.cpp
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index f8275fae93681bdaeaf152b2e3cb6320b345d824..a76a2ff0af380cb6db791f47feedb5f87f65b568 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -27,7 +27,7 @@ SkBaseDevice::SkBaseDevice(const SkSurfaceProps& surfaceProps)
#endif
{
fOrigin.setZero();
- fMetaData = NULL;
+ fMetaData = nullptr;
}
SkBaseDevice::~SkBaseDevice() { delete fMetaData; }
@@ -35,7 +35,7 @@ SkBaseDevice::~SkBaseDevice() { delete fMetaData; }
SkMetaData& SkBaseDevice::getMetaData() {
// metadata users are rare, so we lazily allocate it. If that changes we
// can decide to just make it a field in the device (rather than a ptr)
- if (NULL == fMetaData) {
+ if (nullptr == fMetaData) {
fMetaData = new SkMetaData;
}
return *fMetaData;
@@ -78,7 +78,7 @@ void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer,
path.addRRect(inner);
path.setFillType(SkPath::kEvenOdd_FillType);
- const SkMatrix* preMatrix = NULL;
+ const SkMatrix* preMatrix = nullptr;
const bool pathIsMutable = true;
this->drawPath(draw, path, paint, preMatrix, pathIsMutable);
}
@@ -212,7 +212,7 @@ void SkBaseDevice::drawAtlas(const SkDraw& draw, const SkImage* atlas, const SkR
path.rewind();
path.addPoly(quad, 4, true);
path.setConvexity(SkPath::kConvex_Convexity);
- this->drawPath(draw, path, pnt, NULL, true);
+ this->drawPath(draw, path, pnt, nullptr, true);
}
}
@@ -263,7 +263,7 @@ bool SkBaseDevice::EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const S
bool SkBaseDevice::accessPixels(SkPixmap* pmap) {
SkPixmap tempStorage;
- if (NULL == pmap) {
+ if (nullptr == pmap) {
pmap = &tempStorage;
}
return this->onAccessPixels(pmap);
@@ -271,7 +271,7 @@ bool SkBaseDevice::accessPixels(SkPixmap* pmap) {
bool SkBaseDevice::peekPixels(SkPixmap* pmap) {
SkPixmap tempStorage;
- if (NULL == pmap) {
+ if (nullptr == pmap) {
pmap = &tempStorage;
}
return this->onPeekPixels(pmap);
@@ -357,10 +357,10 @@ static void morphpath(SkPath* dst, const SkPath& src, SkPathMeasure& meas,
void SkBaseDevice::drawTextOnPath(const SkDraw& draw, const void* text, size_t byteLength,
const SkPath& follow, const SkMatrix* matrix,
const SkPaint& paint) {
- SkASSERT(byteLength == 0 || text != NULL);
+ SkASSERT(byteLength == 0 || text != nullptr);
// nothing to draw
- if (text == NULL || byteLength == 0 || draw.fRC->isEmpty()) {
+ if (text == nullptr || byteLength == 0 || draw.fRC->isEmpty()) {
return;
}
@@ -395,7 +395,7 @@ void SkBaseDevice::drawTextOnPath(const SkDraw& draw, const void* text, size_t b
m.postConcat(*matrix);
}
morphpath(&tmp, *iterPath, meas, m);
- this->drawPath(draw, tmp, iter.getPaint(), NULL, true);
+ this->drawPath(draw, tmp, iter.getPaint(), nullptr, true);
}
}
}
« no previous file with comments | « src/core/SkDescriptor.h ('k') | src/core/SkDeviceLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698