Index: src/doc/SkDocument_XPS.cpp |
diff --git a/src/doc/SkDocument_XPS.cpp b/src/doc/SkDocument_XPS.cpp |
index 884d9a5c4516807b4c5af746fc360ee1a8407ff4..943d0a882a377ec82a7c3a47b939eadbe60e19b6 100644 |
--- a/src/doc/SkDocument_XPS.cpp |
+++ b/src/doc/SkDocument_XPS.cpp |
@@ -33,7 +33,7 @@ protected: |
const SkRect& trimBox) override { |
fDevice.beginSheet(fUnitsPerMeter, fPixelsPerMeter, |
SkSize::Make(width, height)); |
- fCanvas.reset(SkNEW_ARGS(SkCanvas, (&fDevice))); |
+ fCanvas.reset(new SkCanvas(&fDevice)); |
fCanvas->clipRect(trimBox); |
fCanvas->translate(trimBox.x(), trimBox.y()); |
return fCanvas.get(); |
@@ -63,17 +63,15 @@ private: |
/////////////////////////////////////////////////////////////////////////////// |
SkDocument* SkDocument::CreateXPS(SkWStream* stream, SkScalar dpi) { |
- return stream ? SkNEW_ARGS(SkDocument_XPS, (stream, NULL, dpi)) : NULL; |
+ return stream ? new SkDocument_XPS(stream, NULL, dpi) : NULL; |
} |
-static void delete_wstream(SkWStream* stream, bool aborted) { |
- SkDELETE(stream); |
-} |
+static void delete_wstream(SkWStream* stream, bool aborted) { delete stream; } |
SkDocument* SkDocument::CreateXPS(const char path[], SkScalar dpi) { |
- SkAutoTDelete<SkFILEWStream> stream(SkNEW_ARGS(SkFILEWStream, (path))); |
+ SkAutoTDelete<SkFILEWStream> stream(new SkFILEWStream(path)); |
if (!stream->isValid()) { |
return NULL; |
} |
- return SkNEW_ARGS(SkDocument_XPS, (stream.detach(), delete_wstream, dpi)); |
+ return new SkDocument_XPS(stream.detach(), delete_wstream, dpi); |
} |