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

Unified Diff: src/doc/SkDocument_PDF.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 | « src/core/SkYUVPlanesCache.cpp ('k') | src/doc/SkDocument_XPS.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/doc/SkDocument_PDF.cpp
diff --git a/src/doc/SkDocument_PDF.cpp b/src/doc/SkDocument_PDF.cpp
index c1d5f0f461d039c047abc58b07b2d785e51b0fe1..1741239bcc37a1f06bd4c602080c943fa4d83cb8 100644
--- a/src/doc/SkDocument_PDF.cpp
+++ b/src/doc/SkDocument_PDF.cpp
@@ -63,11 +63,11 @@ static void perform_font_subsetting(
static SkPDFObject* create_pdf_page_content(const SkPDFDevice* pageDevice) {
SkAutoTDelete<SkStreamAsset> content(pageDevice->content());
- return SkNEW_ARGS(SkPDFStream, (content.get()));
+ return new SkPDFStream(content.get());
}
static SkPDFDict* create_pdf_page(const SkPDFDevice* pageDevice) {
- SkAutoTUnref<SkPDFDict> page(SkNEW_ARGS(SkPDFDict, ("Page")));
+ SkAutoTUnref<SkPDFDict> page(new SkPDFDict("Page"));
page->insertObject("Resources", pageDevice->createResourceDict());
page->insertObject("MediaBox", pageDevice->copyMediaBox());
if (SkPDFArray* annots = pageDevice->getAnnotations()) {
@@ -162,7 +162,7 @@ static bool emit_pdf_document(const SkTDArray<const SkPDFDevice*>& pageDevices,
}
SkTDArray<SkPDFDict*> pages;
- SkAutoTUnref<SkPDFDict> dests(SkNEW(SkPDFDict));
+ SkAutoTUnref<SkPDFDict> dests(new SkPDFDict);
for (int i = 0; i < pageDevices.count(); i++) {
SkASSERT(pageDevices[i]);
@@ -174,7 +174,7 @@ static bool emit_pdf_document(const SkTDArray<const SkPDFDevice*>& pageDevices,
}
SkTDArray<SkPDFDict*> pageTree;
- SkAutoTUnref<SkPDFDict> docCatalog(SkNEW_ARGS(SkPDFDict, ("Catalog")));
+ SkAutoTUnref<SkPDFDict> docCatalog(new SkPDFDict("Catalog"));
SkPDFDict* pageTreeRoot;
generate_page_tree(pages, &pageTree, &pageTreeRoot);
@@ -308,7 +308,7 @@ protected:
SkScalarRoundToInt(width), SkScalarRoundToInt(height));
SkAutoTUnref<SkPDFDevice> device(
SkPDFDevice::Create(pageSize, fRasterDpi, &fCanon));
- fCanvas.reset(SkNEW_ARGS(SkCanvas, (device.get())));
+ fCanvas.reset(new SkCanvas(device.get()));
fPageDevices.push(device.detach());
fCanvas->clipRect(trimBox);
fCanvas->translate(trimBox.x(), trimBox.y());
@@ -345,15 +345,15 @@ private:
///////////////////////////////////////////////////////////////////////////////
SkDocument* SkDocument::CreatePDF(SkWStream* stream, SkScalar dpi) {
- return stream ? SkNEW_ARGS(SkDocument_PDF, (stream, NULL, dpi)) : NULL;
+ return stream ? new SkDocument_PDF(stream, NULL, dpi) : NULL;
}
SkDocument* SkDocument::CreatePDF(const char path[], SkScalar dpi) {
- SkFILEWStream* stream = SkNEW_ARGS(SkFILEWStream, (path));
+ SkFILEWStream* stream = new SkFILEWStream(path);
if (!stream->isValid()) {
- SkDELETE(stream);
+ delete stream;
return NULL;
}
- auto delete_wstream = [](SkWStream* stream, bool) { SkDELETE(stream); };
- return SkNEW_ARGS(SkDocument_PDF, (stream, delete_wstream, dpi));
+ auto delete_wstream = [](SkWStream* stream, bool) { delete stream; };
+ return new SkDocument_PDF(stream, delete_wstream, dpi);
}
« no previous file with comments | « src/core/SkYUVPlanesCache.cpp ('k') | src/doc/SkDocument_XPS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698