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

Unified Diff: src/pdf/SkPDFUtils.cpp

Issue 1775143002: Revert of SkPDF: Add sk_sp setters; .release() becomes std::move() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFUtils.h ('k') | tests/PDFPrimitivesTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFUtils.cpp
diff --git a/src/pdf/SkPDFUtils.cpp b/src/pdf/SkPDFUtils.cpp
index f305765389685625d3bc7d5a8310077d129f1bc6..30d6ee7d68899b7f3415352abb668d1966c432fb 100644
--- a/src/pdf/SkPDFUtils.cpp
+++ b/src/pdf/SkPDFUtils.cpp
@@ -18,8 +18,9 @@
#include <cmath>
-sk_sp<SkPDFArray> SkPDFUtils::RectToArray(const SkRect& rect) {
- auto result = sk_make_sp<SkPDFArray>();
+//static
+SkPDFArray* SkPDFUtils::RectToArray(const SkRect& rect) {
+ SkPDFArray* result = new SkPDFArray();
result->reserve(4);
result->appendScalar(rect.fLeft);
result->appendScalar(rect.fTop);
@@ -28,13 +29,14 @@
return result;
}
-sk_sp<SkPDFArray> SkPDFUtils::MatrixToArray(const SkMatrix& matrix) {
+// static
+SkPDFArray* SkPDFUtils::MatrixToArray(const SkMatrix& matrix) {
SkScalar values[6];
if (!matrix.asAffine(values)) {
SkMatrix::SetAffineIdentity(values);
}
- auto result = sk_make_sp<SkPDFArray>();
+ SkPDFArray* result = new SkPDFArray;
result->reserve(6);
for (size_t i = 0; i < SK_ARRAY_COUNT(values); i++) {
result->appendScalar(values[i]);
« no previous file with comments | « src/pdf/SkPDFUtils.h ('k') | tests/PDFPrimitivesTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698