| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009 Google Inc. | 2 * Copyright 2009 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */ | 8 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */ |
| 9 | 9 |
| 10 #include <unistd.h> | 10 #include <unistd.h> |
| 11 #include <fcntl.h> | 11 #include <fcntl.h> |
| 12 | 12 |
| 13 #include <fontconfig/fontconfig.h> | 13 #include <fontconfig/fontconfig.h> |
| 14 | 14 |
| 15 #include "SkBuffer.h" | 15 #include "SkBuffer.h" |
| 16 #include "SkFontConfigInterface.h" | 16 #include "SkFontConfigInterface.h" |
| 17 #include "SkLazyPtr.h" | 17 #include "SkLazyPtr.h" |
| 18 #include "SkMutex.h" | |
| 19 #include "SkStream.h" | 18 #include "SkStream.h" |
| 20 #include "SkString.h" | 19 #include "SkString.h" |
| 21 | 20 |
| 22 size_t SkFontConfigInterface::FontIdentity::writeToMemory(void* addr) const { | 21 size_t SkFontConfigInterface::FontIdentity::writeToMemory(void* addr) const { |
| 23 size_t size = sizeof(fID) + sizeof(fTTCIndex); | 22 size_t size = sizeof(fID) + sizeof(fTTCIndex); |
| 24 size += sizeof(int32_t) + sizeof(int32_t) + sizeof(uint8_t); // weight, widt
h, italic | 23 size += sizeof(int32_t) + sizeof(int32_t) + sizeof(uint8_t); // weight, widt
h, italic |
| 25 size += sizeof(int32_t) + fString.size(); // store length+data | 24 size += sizeof(int32_t) + fString.size(); // store length+data |
| 26 if (addr) { | 25 if (addr) { |
| 27 SkWBuffer buffer(addr, size); | 26 SkWBuffer buffer(addr, size); |
| 28 | 27 |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 *trimmedMatches.append() = match[i]; | 727 *trimmedMatches.append() = match[i]; |
| 729 } | 728 } |
| 730 } | 729 } |
| 731 | 730 |
| 732 SkFontStyleSet_FC* sset = SkNEW_ARGS(SkFontStyleSet_FC, | 731 SkFontStyleSet_FC* sset = SkNEW_ARGS(SkFontStyleSet_FC, |
| 733 (trimmedMatches.begin(), | 732 (trimmedMatches.begin(), |
| 734 trimmedMatches.count())); | 733 trimmedMatches.count())); |
| 735 #endif | 734 #endif |
| 736 return false; | 735 return false; |
| 737 } | 736 } |
| OLD | NEW |