| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/font_config_ipc_linux.h" | 5 #include "content/common/font_config_ipc_linux.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <sys/mman.h> | 10 #include <sys/mman.h> |
| 11 #include <sys/socket.h> | 11 #include <sys/socket.h> |
| 12 #include <sys/stat.h> | 12 #include <sys/stat.h> |
| 13 #include <sys/uio.h> | 13 #include <sys/uio.h> |
| 14 #include <unistd.h> | 14 #include <unistd.h> |
| 15 | 15 |
| 16 #include <functional> | 16 #include <functional> |
| 17 | 17 |
| 18 #include "base/files/file_util.h" | 18 #include "base/files/file_util.h" |
| 19 #include "base/files/memory_mapped_file.h" | 19 #include "base/files/memory_mapped_file.h" |
| 20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
| 21 #include "base/memory/scoped_ptr.h" |
| 21 #include "base/pickle.h" | 22 #include "base/pickle.h" |
| 22 #include "base/posix/unix_domain_socket_linux.h" | 23 #include "base/posix/unix_domain_socket_linux.h" |
| 23 #include "base/threading/thread_restrictions.h" | 24 #include "base/threading/thread_restrictions.h" |
| 24 #include "base/trace_event/trace_event.h" | 25 #include "base/trace_event/trace_event.h" |
| 25 #include "skia/ext/refptr.h" | 26 #include "skia/ext/refptr.h" |
| 26 #include "skia/ext/skia_utils_base.h" | 27 #include "skia/ext/skia_utils_base.h" |
| 27 #include "third_party/skia/include/core/SkData.h" | 28 #include "third_party/skia/include/core/SkData.h" |
| 28 #include "third_party/skia/include/core/SkStream.h" | 29 #include "third_party/skia/include/core/SkStream.h" |
| 29 #include "third_party/skia/include/core/SkTypeface.h" | 30 #include "third_party/skia/include/core/SkTypeface.h" |
| 30 | 31 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 if (!typeface_stream) | 169 if (!typeface_stream) |
| 169 return nullptr; | 170 return nullptr; |
| 170 skia::RefPtr<SkTypeface> typeface_from_stream = skia::AdoptRef( | 171 skia::RefPtr<SkTypeface> typeface_from_stream = skia::AdoptRef( |
| 171 SkTypeface::CreateFromStream(typeface_stream, identity.fTTCIndex)); | 172 SkTypeface::CreateFromStream(typeface_stream, identity.fTTCIndex)); |
| 172 auto mapped_typefaces_insert_it = | 173 auto mapped_typefaces_insert_it = |
| 173 mapped_typefaces_.Put(identity, typeface_from_stream); | 174 mapped_typefaces_.Put(identity, typeface_from_stream); |
| 174 return SkSafeRef(mapped_typefaces_insert_it->second.get()); | 175 return SkSafeRef(mapped_typefaces_insert_it->second.get()); |
| 175 } | 176 } |
| 176 | 177 |
| 177 } // namespace content | 178 } // namespace content |
| OLD | NEW |