Index: printing/metafile_skia_wrapper.cc |
diff --git a/printing/metafile_skia_wrapper.cc b/printing/metafile_skia_wrapper.cc |
index df0e926ac053a9d11b9586c065d9d54830125b9d..5d3bd6e9d6cca0a227adddfbc46dd9904f57800f 100644 |
--- a/printing/metafile_skia_wrapper.cc |
+++ b/printing/metafile_skia_wrapper.cc |
@@ -4,8 +4,8 @@ |
#include "printing/metafile_skia_wrapper.h" |
#include "skia/ext/platform_canvas.h" |
-#include "skia/ext/refptr.h" |
#include "third_party/skia/include/core/SkMetaData.h" |
+#include "third_party/skia/include/core/SkRefCnt.h" |
namespace printing { |
@@ -18,9 +18,10 @@ const char kMetafileKey[] = "CrMetafile"; |
// static |
void MetafileSkiaWrapper::SetMetafileOnCanvas(const SkCanvas& canvas, |
PdfMetafileSkia* metafile) { |
- skia::RefPtr<MetafileSkiaWrapper> wrapper; |
+ sk_sp<MetafileSkiaWrapper> wrapper; |
+ // Can't use sk_make_sp<>() because the constructor is private. |
if (metafile) |
- wrapper = skia::AdoptRef(new MetafileSkiaWrapper(metafile)); |
+ wrapper = sk_sp<MetafileSkiaWrapper>(new MetafileSkiaWrapper(metafile)); |
SkMetaData& meta = skia::GetMetaData(canvas); |
meta.setRefCnt(kMetafileKey, wrapper.get()); |