Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003
Review URL: https://codereview.chromium.org/1316123003
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index daf8425..03c5173 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -203,7 +203,7 @@
device->onAttachToCanvas(canvas);
}
fDevice = device;
- fPaint = paint ? SkNEW_ARGS(SkPaint, (*paint)) : NULL;
+ fPaint = paint ? new SkPaint(*paint) : NULL;
}
~DeviceCM() {
@@ -211,7 +211,7 @@
fDevice->onDetachFromCanvas();
fDevice->unref();
}
- SkDELETE(fPaint);
+ delete fPaint;
}
void reset(const SkIRect& bounds) {
@@ -304,7 +304,7 @@
}
~MCRec() {
SkSafeUnref(fFilter);
- SkDELETE(fLayer);
+ delete fLayer;
dec_rec();
}
@@ -604,7 +604,7 @@
fSaveCount = 1;
fMetaData = NULL;
- fClipStack.reset(SkNEW(SkClipStack));
+ fClipStack.reset(new SkClipStack);
fMCRec = (MCRec*)fMCStack.push_back();
new (fMCRec) MCRec(fConservativeRasterClip);
@@ -664,8 +664,8 @@
{
inc_canvas();
- this->init(SkNEW_ARGS(SkNoPixelsBitmapDevice,
- (SkIRect::MakeWH(width, height), fProps)), kDefault_InitFlags)->unref();
+ this->init(new SkNoPixelsBitmapDevice(SkIRect::MakeWH(width, height), fProps),
+ kDefault_InitFlags)->unref();
}
SkCanvas::SkCanvas(const SkIRect& bounds, InitFlags flags)
@@ -674,7 +674,7 @@
{
inc_canvas();
- this->init(SkNEW_ARGS(SkNoPixelsBitmapDevice, (bounds, fProps)), flags)->unref();
+ this->init(new SkNoPixelsBitmapDevice(bounds, fProps), flags)->unref();
}
SkCanvas::SkCanvas(SkBaseDevice* device)
@@ -701,7 +701,7 @@
{
inc_canvas();
- SkAutoTUnref<SkBaseDevice> device(SkNEW_ARGS(SkBitmapDevice, (bitmap, fProps)));
+ SkAutoTUnref<SkBaseDevice> device(new SkBitmapDevice(bitmap, fProps));
this->init(device, kDefault_InitFlags);
}
@@ -711,7 +711,7 @@
{
inc_canvas();
- SkAutoTUnref<SkBaseDevice> device(SkNEW_ARGS(SkBitmapDevice, (bitmap, fProps)));
+ SkAutoTUnref<SkBaseDevice> device(new SkBitmapDevice(bitmap, fProps));
this->init(device, kDefault_InitFlags);
}
@@ -721,7 +721,7 @@
this->internalRestore(); // restore the last, since we're going away
- SkDELETE(fMetaData);
+ delete fMetaData;
dec_canvas();
}
@@ -1135,8 +1135,8 @@
}
device->setOrigin(ir.fLeft, ir.fTop);
- DeviceCM* layer = SkNEW_ARGS(DeviceCM, (device, paint, this, fConservativeRasterClip,
- forceSpriteOnRestore));
+ DeviceCM* layer =
+ new DeviceCM(device, paint, this, fConservativeRasterClip, forceSpriteOnRestore);
device->unref();
layer->fNext = fMCRec->fTopLayer;
@@ -1188,7 +1188,7 @@
layer->fPaint, layer->fDeviceIsBitmapDevice);
// reset this, since internalDrawDevice will have set it to true
fDeviceCMDirty = true;
- SkDELETE(layer);
+ delete layer;
} else {
// we're at the root
SkASSERT(layer == (void*)fDeviceCMStorage);
@@ -2876,7 +2876,7 @@
if (!bitmap.installPixels(info, pixels, rowBytes)) {
return NULL;
}
- return SkNEW_ARGS(SkCanvas, (bitmap));
+ return new SkCanvas(bitmap);
}
///////////////////////////////////////////////////////////////////////////////