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

Unified Diff: components/font_service/public/cpp/mapped_font_file.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: components/font_service/public/cpp/mapped_font_file.cc
diff --git a/components/font_service/public/cpp/mapped_font_file.cc b/components/font_service/public/cpp/mapped_font_file.cc
index 940c1077c6a3774d81957c5f2773aca51307cae8..f7bf1731405a90d6ecc2e0243745de600db6cb05 100644
--- a/components/font_service/public/cpp/mapped_font_file.cc
+++ b/components/font_service/public/cpp/mapped_font_file.cc
@@ -8,9 +8,9 @@
#include "base/files/file_util.h"
#include "base/threading/thread_restrictions.h"
-#include "skia/ext/refptr.h"
#include "skia/ext/skia_utils_base.h"
#include "third_party/skia/include/core/SkData.h"
+#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkStream.h"
namespace font_service {
@@ -26,13 +26,13 @@ bool MappedFontFile::Initialize(base::File file) {
SkMemoryStream* MappedFontFile::CreateMemoryStream() {
DCHECK(mapped_font_file_.IsValid());
- auto data = skia::AdoptRef(
- SkData::NewWithProc(mapped_font_file_.data(), mapped_font_file_.length(),
- &MappedFontFile::ReleaseProc, this));
+ sk_sp<SkData> data =
+ SkData::MakeWithProc(mapped_font_file_.data(), mapped_font_file_.length(),
+ &MappedFontFile::ReleaseProc, this);
if (!data)
return nullptr;
AddRef();
- return new SkMemoryStream(data.get());
+ return new SkMemoryStream(std::move(data));
}
MappedFontFile::~MappedFontFile() {

Powered by Google App Engine
This is Rietveld 408576698