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

Unified Diff: tools/PictureRenderer.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/PictureBenchmark.cpp ('k') | tools/PictureRenderingFlags.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/PictureRenderer.cpp
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index 34b08f567c89ef082048ab1066aa44bde423fc67..ee8e981a3989b18fcb34440e1fc258d0d7cee413 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -131,7 +131,7 @@ SkCanvas* PictureRenderer::setupCanvas(int width, int height) {
case kBitmap_DeviceType: {
SkBitmap bitmap;
sk_tools::setup_bitmap(&bitmap, width, height);
- canvas.reset(SkNEW_ARGS(SkCanvas, (bitmap)));
+ canvas.reset(new SkCanvas(bitmap));
}
break;
#if SK_SUPPORT_GPU
@@ -165,7 +165,7 @@ SkCanvas* PictureRenderer::setupCanvas(int width, int height) {
if (!device) {
return NULL;
}
- canvas.reset(SkNEW_ARGS(SkCanvas, (device)));
+ canvas.reset(new SkCanvas(device));
break;
}
#endif
@@ -179,7 +179,7 @@ SkCanvas* PictureRenderer::setupCanvas(int width, int height) {
canvas->setAllowSoftClip(false);
}
- canvas.reset(SkNEW_ARGS(FlagsFilterCanvas, (canvas.get(), fDrawFilters)));
+ canvas.reset(new FlagsFilterCanvas(canvas.get(), fDrawFilters));
}
this->scaleToScaleFactor(canvas);
@@ -408,7 +408,7 @@ bool PipePictureRenderer::render(SkBitmap** out) {
writer.endRecording();
fCanvas->flush();
if (out) {
- *out = SkNEW(SkBitmap);
+ *out = new SkBitmap;
setup_bitmap(*out, SkScalarCeilToInt(fPicture->cullRect().width()),
SkScalarCeilToInt(fPicture->cullRect().height()));
fCanvas->readPixels(*out, 0, 0);
@@ -453,7 +453,7 @@ bool SimplePictureRenderer::render(SkBitmap** out) {
}
fCanvas->flush();
if (out) {
- *out = SkNEW(SkBitmap);
+ *out = new SkBitmap;
setup_bitmap(*out, SkScalarCeilToInt(fPicture->cullRect().width()),
SkScalarCeilToInt(fPicture->cullRect().height()));
fCanvas->readPixels(*out, 0, 0);
@@ -694,7 +694,7 @@ bool TiledPictureRenderer::render(SkBitmap** out) {
SkBitmap bitmap;
if (out) {
- *out = SkNEW(SkBitmap);
+ *out = new SkBitmap;
setup_bitmap(*out, SkScalarCeilToInt(fPicture->cullRect().width()),
SkScalarCeilToInt(fPicture->cullRect().height()));
setup_bitmap(&bitmap, fTileWidth, fTileHeight);
@@ -794,7 +794,7 @@ SkString TiledPictureRenderer::getConfigNameInternal() {
void PlaybackCreationRenderer::setup() {
SkAutoTDelete<SkBBHFactory> factory(this->getFactory());
- fRecorder.reset(SkNEW(SkPictureRecorder));
+ fRecorder.reset(new SkPictureRecorder);
SkCanvas* canvas = fRecorder->beginRecording(SkIntToScalar(this->getViewWidth()),
SkIntToScalar(this->getViewHeight()),
factory.get(),
@@ -821,7 +821,7 @@ SkBBHFactory* PictureRenderer::getFactory() {
case kNone_BBoxHierarchyType:
return NULL;
case kRTree_BBoxHierarchyType:
- return SkNEW(SkRTreeFactory);
+ return new SkRTreeFactory;
}
SkASSERT(0); // invalid bbhType
return NULL;
« no previous file with comments | « tools/PictureBenchmark.cpp ('k') | tools/PictureRenderingFlags.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698