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

Side by Side Diff: src/pdf/SkPDFDocument.cpp

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPDFCanon.h" 8 #include "SkPDFCanon.h"
9 #include "SkPDFDevice.h" 9 #include "SkPDFDevice.h"
10 #include "SkPDFDocument.h" 10 #include "SkPDFDocument.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 SkDocument* SkDocument::CreatePDF(SkWStream* stream, 392 SkDocument* SkDocument::CreatePDF(SkWStream* stream,
393 SkScalar dpi, 393 SkScalar dpi,
394 SkPixelSerializer* jpegEncoder) { 394 SkPixelSerializer* jpegEncoder) {
395 return SkPDFMakeDocument(stream, nullptr, dpi, jpegEncoder).release(); 395 return SkPDFMakeDocument(stream, nullptr, dpi, jpegEncoder).release();
396 } 396 }
397 397
398 SkDocument* SkDocument::CreatePDF(const char path[], SkScalar dpi) { 398 SkDocument* SkDocument::CreatePDF(const char path[], SkScalar dpi) {
399 auto delete_wstream = [](SkWStream* stream, bool) { delete stream; }; 399 auto delete_wstream = [](SkWStream* stream, bool) { delete stream; };
400 SkAutoTDelete<SkFILEWStream> stream(new SkFILEWStream(path)); 400 SkAutoTDelete<SkFILEWStream> stream(new SkFILEWStream(path));
401 return stream->isValid() 401 return stream->isValid()
402 ? SkPDFMakeDocument(stream.detach(), delete_wstream, dpi, nullptr).relea se() 402 ? SkPDFMakeDocument(stream.release(), delete_wstream, dpi, nullptr).rele ase()
403 : nullptr; 403 : nullptr;
404 } 404 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698