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 780e5f08de30767965e65de8e3f6a0cee91716f5..75f33eefc97d71d68411c6480d5bbd70762598ef 100644 |
--- a/content/common/font_config_ipc_linux.cc |
+++ b/content/common/font_config_ipc_linux.cc |
@@ -158,12 +158,12 @@ SkStreamAsset* FontConfigIPC::openStream(const FontIdentity& identity) { |
return mapFileDescriptorToStream(result_fd); |
} |
-SkTypeface* FontConfigIPC::createTypeface( |
+sk_sp<SkTypeface> FontConfigIPC::makeTypeface( |
const SkFontConfigInterface::FontIdentity& identity) { |
base::AutoLock lock(lock_); |
auto mapped_typefaces_it = mapped_typefaces_.Get(identity); |
if (mapped_typefaces_it != mapped_typefaces_.end()) |
- return SkSafeRef(mapped_typefaces_it->second.get()); |
+ return mapped_typefaces_it->second; |
SkStreamAsset* typeface_stream = openStream(identity); |
if (!typeface_stream) |
@@ -172,7 +172,7 @@ SkTypeface* FontConfigIPC::createTypeface( |
SkTypeface::CreateFromStream(typeface_stream, identity.fTTCIndex)); |
f(malita)
2016/06/03 17:11:59
SkTypeface::MakeFromStream while here?
bungeman-chromium
2016/06/03 18:28:18
Done.
|
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; |
f(malita)
2016/06/03 17:11:59
Not new to this CL, but I wonder if it'd help to r
bungeman-chromium
2016/06/03 18:28:18
Ah, I see, the stack has a ref and then the map ge
f(malita)
2016/06/03 19:04:03
Awesome, thanks!
|
} |
} // namespace content |