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..06003d289095941a390b39ee4cf2fe6189298f8b 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(data); |
f(malita)
2016/05/04 17:22:13
std::move(data)
tomhudson
2016/05/04 17:47:10
Done.
|
} |
SkStreamAsset* FontConfigIPC::openStream(const FontIdentity& identity) { |
@@ -168,11 +168,11 @@ 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); |
- return SkSafeRef(mapped_typefaces_insert_it->second.get()); |
+ return mapped_typefaces_insert_it->second.release(); |
f(malita)
2016/05/04 17:22:13
I'm not familiar with HashingMRUCache, but this lo
tomhudson
2016/05/04 17:47:10
I'm not happy with this either, but it's inheritin
f(malita)
2016/05/04 18:12:22
Would certainly be nice to return a smart ref from
tomhudson
2016/05/26 20:33:16
Done.
|
} |
} // namespace content |