diff options
author | halcanary <halcanary@google.com> | 2016-03-07 12:39:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-07 12:39:14 -0800 |
commit | d7b2885b90c6d248d8188cdb3720ea9150568a89 (patch) | |
tree | bd50ab8fb46ec290dea10c5d379324c91b4eff05 /src/pdf/SkPDFDevice.cpp | |
parent | f9deeb66d0941adfade8a24fc3b8217f9473bb1d (diff) |
SkPDF Create working move constructor for inner classes
BUG=chromium:592330,chromium:592702
Review URL: https://codereview.chromium.org/1774633002
Diffstat (limited to 'src/pdf/SkPDFDevice.cpp')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index 4feb78f334..7a69c631d8 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -1416,15 +1416,15 @@ void SkPDFDevice::drawDevice(const SkDraw& d, SkBaseDevice* device, SkScalar scalarY = SkIntToScalar(y); for (const RectWithData& l : pdfDevice->fLinkToURLs) { SkRect r = l.rect.makeOffset(scalarX, scalarY); - fLinkToURLs.emplace_back(r, l.data); + fLinkToURLs.emplace_back(r, l.data.get()); } for (const RectWithData& l : pdfDevice->fLinkToDestinations) { SkRect r = l.rect.makeOffset(scalarX, scalarY); - fLinkToDestinations.emplace_back(r, l.data); + fLinkToDestinations.emplace_back(r, l.data.get()); } for (const NamedDestination& d : pdfDevice->fNamedDestinations) { SkPoint p = d.point + SkPoint::Make(scalarX, scalarY); - fNamedDestinations.emplace_back(d.nameData, p); + fNamedDestinations.emplace_back(d.nameData.get(), p); } if (pdfDevice->isContentEmpty()) { @@ -1699,12 +1699,13 @@ void SkPDFDevice::appendAnnotations(SkPDFArray* array) const { for (const RectWithData& rectWithURL : fLinkToURLs) { SkRect r; fInitialTransform.mapRect(&r, rectWithURL.rect); - array->appendObject(create_link_to_url(rectWithURL.data, r)); + array->appendObject(create_link_to_url(rectWithURL.data.get(), r)); } for (const RectWithData& linkToDestination : fLinkToDestinations) { SkRect r; fInitialTransform.mapRect(&r, linkToDestination.rect); - array->appendObject(create_link_named_dest(linkToDestination.data, r)); + array->appendObject( + create_link_named_dest(linkToDestination.data.get(), r)); } } |