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

Unified Diff: content/common/font_config_ipc_linux.cc

Issue 1951013003: Remove all uses of skia::RefPtr and stale includes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Florin's smart pointer fix Created 4 years, 7 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
« no previous file with comments | « content/common/font_config_ipc_linux.h ('k') | content/common/platform_notification_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/font_config_ipc_linux.cc
diff --git a/content/common/font_config_ipc_linux.cc b/content/common/font_config_ipc_linux.cc
index fff2fb95c898d7c0653719a58ce7d42386a1f8e2..780e5f08de30767965e65de8e3f6a0cee91716f5 100644
--- a/content/common/font_config_ipc_linux.cc
+++ b/content/common/font_config_ipc_linux.cc
@@ -23,9 +23,9 @@
#include "base/posix/unix_domain_socket_linux.h"
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/trace_event.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"
#include "third_party/skia/include/core/SkTypeface.h"
@@ -123,13 +123,13 @@ SkMemoryStream* FontConfigIPC::mapFileDescriptorToStream(int fd) {
mapped_font_file->Initialize(base::File(fd));
DCHECK(mapped_font_file->IsValid());
- auto data = skia::AdoptRef(
- SkData::NewWithProc(mapped_font_file->data(), mapped_font_file->length(),
- &DestroyMemoryMappedFile, mapped_font_file.get()));
+ sk_sp<SkData> data =
+ SkData::MakeWithProc(mapped_font_file->data(), mapped_font_file->length(),
+ &DestroyMemoryMappedFile, mapped_font_file.get());
if (!data)
return nullptr;
ignore_result(mapped_font_file.release()); // Ownership transferred to SkDataB
- return new SkMemoryStream(data.get());
+ return new SkMemoryStream(std::move(data));
}
SkStreamAsset* FontConfigIPC::openStream(const FontIdentity& identity) {
@@ -168,7 +168,7 @@ SkTypeface* FontConfigIPC::createTypeface(
SkStreamAsset* typeface_stream = openStream(identity);
if (!typeface_stream)
return nullptr;
- skia::RefPtr<SkTypeface> typeface_from_stream = skia::AdoptRef(
+ sk_sp<SkTypeface> typeface_from_stream(
SkTypeface::CreateFromStream(typeface_stream, identity.fTTCIndex));
auto mapped_typefaces_insert_it =
mapped_typefaces_.Put(identity, typeface_from_stream);
« no previous file with comments | « content/common/font_config_ipc_linux.h ('k') | content/common/platform_notification_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698