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

Unified Diff: tools/render_pictures_main.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 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 | « tools/render_pdfs_main.cpp ('k') | tools/sk_tool_utils_font.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 392083197eed8706bada036ccdc4a5d91dc1560f..8cda9666649017f99f0fcf59fc6a6bef1e38e877 100644
--- a/tools/render_pictures_main.cpp
+++ b/tools/render_pictures_main.cpp
@@ -273,7 +273,7 @@ static bool render_picture(const SkString& inputPath, const SkString* writePath,
if (!success || ((FLAGS_validate || FLAGS_writeWholeImage) && bitmap == NULL)) {
SkDebugf("Failed to draw the picture.\n");
- SkDELETE(bitmap);
+ delete bitmap;
return false;
}
@@ -290,10 +290,9 @@ static bool render_picture(const SkString& inputPath, const SkString* writePath,
arbbh.set(referenceRenderer, sk_tools::PictureRenderer::kNone_BBoxHierarchyType);
} else {
#if SK_SUPPORT_GPU
- referenceRenderer = SkNEW_ARGS(sk_tools::SimplePictureRenderer,
- (renderer.getGrContextOptions()));
+ referenceRenderer = new sk_tools::SimplePictureRenderer(renderer.getGrContextOptions());
#else
- referenceRenderer = SkNEW(sk_tools::SimplePictureRenderer);
+ referenceRenderer = new sk_tools::SimplePictureRenderer;
#endif
}
SkAutoTUnref<sk_tools::PictureRenderer> aurReferenceRenderer(referenceRenderer);
@@ -303,23 +302,23 @@ static bool render_picture(const SkString& inputPath, const SkString* writePath,
if (!success || NULL == referenceBitmap || NULL == referenceBitmap->getPixels()) {
SkDebugf("Failed to draw the reference picture.\n");
- SkDELETE(bitmap);
- SkDELETE(referenceBitmap);
+ delete bitmap;
+ delete referenceBitmap;
return false;
}
if (success && (bitmap->width() != referenceBitmap->width())) {
SkDebugf("Expected image width: %i, actual image width %i.\n",
referenceBitmap->width(), bitmap->width());
- SkDELETE(bitmap);
- SkDELETE(referenceBitmap);
+ delete bitmap;
+ delete referenceBitmap;
return false;
}
if (success && (bitmap->height() != referenceBitmap->height())) {
SkDebugf("Expected image height: %i, actual image height %i",
referenceBitmap->height(), bitmap->height());
- SkDELETE(bitmap);
- SkDELETE(referenceBitmap);
+ delete bitmap;
+ delete referenceBitmap;
return false;
}
@@ -336,13 +335,13 @@ static bool render_picture(const SkString& inputPath, const SkString* writePath,
x, y, FLAGS_maxComponentDiff,
*referenceBitmap->getAddr32(x, y),
*bitmap->getAddr32(x, y));
- SkDELETE(bitmap);
- SkDELETE(referenceBitmap);
+ delete bitmap;
+ delete referenceBitmap;
return false;
}
}
}
- SkDELETE(referenceBitmap);
+ delete referenceBitmap;
for (int i = 1; i <= 255; ++i) {
if(diffs[i] > 0) {
@@ -373,7 +372,7 @@ static bool render_picture(const SkString& inputPath, const SkString* writePath,
success &= sk_tools::write_bitmap_to_disk(*bitmap, *writePath, NULL, outputFilename);
}
}
- SkDELETE(bitmap);
+ delete bitmap;
return success;
}
« no previous file with comments | « tools/render_pdfs_main.cpp ('k') | tools/sk_tool_utils_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698