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

Unified Diff: printing/metafile_skia_wrapper.cc

Issue 1923943002: Remove all uses of skia::RefPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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());

Powered by Google App Engine
This is Rietveld 408576698