Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index ee8e981..700d3d3 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -65,14 +65,14 @@
     fUseChecksumBasedFilenames = useChecksumBasedFilenames;
     fUseMultiPictureDraw = useMultiPictureDraw;
 
-    SkASSERT(NULL == fPicture);
-    SkASSERT(NULL == fCanvas.get());
+    SkASSERT(nullptr == fPicture);
+    SkASSERT(nullptr == fCanvas.get());
     if (fPicture || fCanvas.get()) {
         return;
     }
 
-    SkASSERT(pict != NULL);
-    if (NULL == pict) {
+    SkASSERT(pict != nullptr);
+    if (nullptr == pict) {
         return;
     }
 
@@ -102,7 +102,7 @@
         if (PictureRenderer::kMaskFilter_DrawFilterFlag & fFlags[t]) {
             SkMaskFilter* maskFilter = paint->getMaskFilter();
             if (maskFilter) {
-                paint->setMaskFilter(NULL);
+                paint->setMaskFilter(nullptr);
             }
         }
         if (PictureRenderer::kHinting_DrawFilterFlag & fFlags[t]) {
@@ -154,7 +154,7 @@
                 desc.fWidth = width;
                 desc.fHeight = height;
                 desc.fSampleCnt = fSampleCount;
-                target.reset(fGrContext->textureProvider()->createTexture(desc, false, NULL, 0));
+                target.reset(fGrContext->textureProvider()->createTexture(desc, false, nullptr, 0));
             }
 
             uint32_t flags = fUseDFText ? SkSurfaceProps::kUseDistanceFieldFonts_Flag : 0;
@@ -163,7 +163,7 @@
                 SkGpuDevice::Create(target->asRenderTarget(), &props,
                                     SkGpuDevice::kUninit_InitContents));
             if (!device) {
-                return NULL;
+                return nullptr;
             }
             canvas.reset(new SkCanvas(device));
             break;
@@ -171,7 +171,7 @@
 #endif
         default:
             SkASSERT(0);
-            return NULL;
+            return nullptr;
     }
 
     if (fHasDrawFilters) {
@@ -192,7 +192,7 @@
 }
 
 void PictureRenderer::scaleToScaleFactor(SkCanvas* canvas) {
-    SkASSERT(canvas != NULL);
+    SkASSERT(canvas != nullptr);
     if (fScaleFactor != SK_Scalar1) {
         canvas->scale(fScaleFactor, fScaleFactor);
     }
@@ -200,12 +200,12 @@
 
 void PictureRenderer::end() {
     this->resetState(true);
-    fPicture.reset(NULL);
-    fCanvas.reset(NULL);
+    fPicture.reset(nullptr);
+    fCanvas.reset(nullptr);
 }
 
 int PictureRenderer::getViewWidth() {
-    SkASSERT(fPicture != NULL);
+    SkASSERT(fPicture != nullptr);
     int width = SkScalarCeilToInt(fPicture->cullRect().width() * fScaleFactor);
     if (fViewport.width() > 0) {
         width = SkMin32(width, fViewport.width());
@@ -214,7 +214,7 @@
 }
 
 int PictureRenderer::getViewHeight() {
-    SkASSERT(fPicture != NULL);
+    SkASSERT(fPicture != nullptr);
     int height = SkScalarCeilToInt(fPicture->cullRect().height() * fScaleFactor);
     if (fViewport.height() > 0) {
         height = SkMin32(height, fViewport.height());
@@ -247,7 +247,7 @@
 void PictureRenderer::resetState(bool callFinish) {
 #if SK_SUPPORT_GPU
     SkGLContext* glContext = this->getGLContext();
-    if (NULL == glContext) {
+    if (nullptr == glContext) {
         SkASSERT(kBitmap_DeviceType == fDeviceType);
         return;
     }
@@ -267,7 +267,7 @@
 
 #if SK_SUPPORT_GPU
     SkGLContext* glContext = this->getGLContext();
-    if (NULL == glContext) {
+    if (nullptr == glContext) {
         SkASSERT(kBitmap_DeviceType == fDeviceType);
         return;
     }
@@ -295,9 +295,9 @@
  */
 static bool write(SkCanvas* canvas, const SkString& writePath, const SkString& mismatchPath,
                   const SkString& inputFilename, ImageResultsAndExpectations *jsonSummaryPtr,
-                  bool useChecksumBasedFilenames, const int* tileNumberPtr=NULL) {
-    SkASSERT(canvas != NULL);
-    if (NULL == canvas) {
+                  bool useChecksumBasedFilenames, const int* tileNumberPtr=nullptr) {
+    SkASSERT(canvas != nullptr);
+    if (nullptr == canvas) {
         return false;
     }
 
@@ -315,7 +315,7 @@
     // TODO(epoger): what about including the config type within outputFilename?  That way,
     // we could combine results of different config types without conflicting filenames.
     SkString outputFilename;
-    const char *outputSubdirPtr = NULL;
+    const char *outputSubdirPtr = nullptr;
     if (useChecksumBasedFilenames) {
         ImageDigest *imageDigestPtr = bitmapAndDigest.getImageDigestPtr();
         outputSubdirPtr = escapedInputFilename.c_str();
@@ -364,7 +364,7 @@
 
 SkCanvas* RecordPictureRenderer::setupCanvas(int width, int height) {
     // defer the canvas setup until the render step
-    return NULL;
+    return nullptr;
 }
 
 bool RecordPictureRenderer::render(SkBitmap** out) {
@@ -395,9 +395,9 @@
 ///////////////////////////////////////////////////////////////////////////////////////////////
 
 bool PipePictureRenderer::render(SkBitmap** out) {
-    SkASSERT(fCanvas.get() != NULL);
-    SkASSERT(fPicture != NULL);
-    if (NULL == fCanvas.get() || NULL == fPicture) {
+    SkASSERT(fCanvas.get() != nullptr);
+    SkASSERT(fPicture != nullptr);
+    if (nullptr == fCanvas.get() || nullptr == fPicture) {
         return false;
     }
 
@@ -436,9 +436,9 @@
 }
 
 bool SimplePictureRenderer::render(SkBitmap** out) {
-    SkASSERT(fCanvas.get() != NULL);
+    SkASSERT(fCanvas.get() != nullptr);
     SkASSERT(fPicture);
-    if (NULL == fCanvas.get() || NULL == fPicture) {
+    if (nullptr == fCanvas.get() || nullptr == fPicture) {
         return false;
     }
 
@@ -493,7 +493,7 @@
                                 bool useChecksumBasedFilenames, bool useMultiPictureDraw) {
     SkASSERT(pict);
     SkASSERT(0 == fTileRects.count());
-    if (NULL == pict || fTileRects.count() != 0) {
+    if (nullptr == pict || fTileRects.count() != 0) {
         return;
     }
 
@@ -550,7 +550,7 @@
 }
 
 bool TiledPictureRenderer::tileDimensions(int &x, int &y) {
-    if (fTileRects.count() == 0 || NULL == fPicture) {
+    if (fTileRects.count() == 0 || nullptr == fPicture) {
         return false;
     }
     x = fTilesX;
@@ -687,8 +687,8 @@
 }
 
 bool TiledPictureRenderer::render(SkBitmap** out) {
-    SkASSERT(fPicture != NULL);
-    if (NULL == fPicture) {
+    SkASSERT(fPicture != nullptr);
+    if (nullptr == fPicture) {
         return false;
     }
 
@@ -819,12 +819,12 @@
 SkBBHFactory* PictureRenderer::getFactory() {
     switch (fBBoxHierarchyType) {
         case kNone_BBoxHierarchyType:
-            return NULL;
+            return nullptr;
         case kRTree_BBoxHierarchyType:
             return new SkRTreeFactory;
     }
     SkASSERT(0); // invalid bbhType
-    return NULL;
+    return nullptr;
 }
 
 } // namespace sk_tools