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

Unified Diff: tools/render_pictures_main.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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 | « tools/picture_utils.cpp ('k') | tools/skdiff_image.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/render_pictures_main.cpp
diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp
index 9ec136c1e7140e1720066176aaa7e0deed1d4ac1..4fb83521c8c3e05e6661463aaf2d9172430dcf78 100644
--- a/tools/render_pictures_main.cpp
+++ b/tools/render_pictures_main.cpp
@@ -145,11 +145,11 @@ static bool render_picture_internal(const SkString& inputPath, const SkString* w
SkBitmap** out) {
SkString inputFilename = SkOSPath::Basename(inputPath.c_str());
SkString writePathString;
- if (NULL != writePath && writePath->size() > 0 && !FLAGS_writeEncodedImages) {
+ if (writePath && writePath->size() > 0 && !FLAGS_writeEncodedImages) {
writePathString.set(*writePath);
}
SkString mismatchPathString;
- if (NULL != mismatchPath && mismatchPath->size() > 0) {
+ if (mismatchPath && mismatchPath->size() > 0) {
mismatchPathString.set(*mismatchPath);
}
@@ -207,7 +207,7 @@ static bool render_picture_internal(const SkString& inputPath, const SkString* w
FLAGS_writeChecksumBasedFilenames);
if (FLAGS_preprocess) {
- if (NULL != renderer.getCanvas()) {
+ if (renderer.getCanvas()) {
renderer.getCanvas()->EXPERIMENTAL_optimize(renderer.getPicture());
}
}
@@ -250,7 +250,7 @@ public:
}
~AutoRestoreBbhType() {
- if (NULL != fRenderer) {
+ if (fRenderer) {
fRenderer->setBBoxHierarchyType(fSavedBbhType);
}
}
@@ -369,17 +369,17 @@ static bool render_picture(const SkString& inputPath, const SkString* writePath,
sk_tools::replace_char(&outputFilename, '.', '_');
outputFilename.append(".png");
- if (NULL != jsonSummaryPtr) {
+ if (jsonSummaryPtr) {
sk_tools::ImageDigest imageDigest(*bitmap);
jsonSummaryPtr->add(inputFilename.c_str(), outputFilename.c_str(), imageDigest);
- if ((NULL != mismatchPath) && !mismatchPath->isEmpty() &&
+ if ((mismatchPath) && !mismatchPath->isEmpty() &&
!jsonSummaryPtr->getExpectation(inputFilename.c_str()).matches(imageDigest)) {
success &= sk_tools::write_bitmap_to_disk(*bitmap, *mismatchPath, NULL,
outputFilename);
}
}
- if ((NULL != writePath) && !writePath->isEmpty()) {
+ if ((writePath) && !writePath->isEmpty()) {
success &= sk_tools::write_bitmap_to_disk(*bitmap, *writePath, NULL, outputFilename);
}
}
« no previous file with comments | « tools/picture_utils.cpp ('k') | tools/skdiff_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698