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

Unified Diff: printing/metafile_skia_wrapper.cc

Issue 2518443002: Experimetal copy of https://codereview.chromium.org/2512783002/ (Closed)
Patch Set: '' Created 4 years, 1 month 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 | « printing/metafile_skia_wrapper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/metafile_skia_wrapper.cc
diff --git a/printing/metafile_skia_wrapper.cc b/printing/metafile_skia_wrapper.cc
index 5d3bd6e9d6cca0a227adddfbc46dd9904f57800f..921b65b0727659a2519502d635683aa7fb42a002 100644
--- a/printing/metafile_skia_wrapper.cc
+++ b/printing/metafile_skia_wrapper.cc
@@ -28,14 +28,14 @@ void MetafileSkiaWrapper::SetMetafileOnCanvas(const SkCanvas& canvas,
}
// static
-PdfMetafileSkia* MetafileSkiaWrapper::GetMetafileFromCanvas(
+sk_sp<MetafileSkiaWrapper> MetafileSkiaWrapper::RefFromCanvas(
const SkCanvas& canvas) {
SkMetaData& meta = skia::GetMetaData(canvas);
SkRefCnt* value;
if (!meta.findRefCnt(kMetafileKey, &value) || !value)
return nullptr;
- return static_cast<MetafileSkiaWrapper*>(value)->metafile_;
+ return sk_ref_sp(static_cast<MetafileSkiaWrapper*>(value));
}
MetafileSkiaWrapper::MetafileSkiaWrapper(PdfMetafileSkia* metafile)
« no previous file with comments | « printing/metafile_skia_wrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698