| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Torch Mobile, Inc. | 3 * Copyright (C) 2009 Torch Mobile, Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 if (m_fontData) { | 129 if (m_fontData) { |
| 130 recordPackageFormatHistogram(packageFormatOf(m_data.get())); | 130 recordPackageFormatHistogram(packageFormatOf(m_data.get())); |
| 131 } else { | 131 } else { |
| 132 setStatus(DecodeError); | 132 setStatus(DecodeError); |
| 133 recordPackageFormatHistogram(PackageFormatUnknown); | 133 recordPackageFormatHistogram(PackageFormatUnknown); |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 return m_fontData; | 136 return m_fontData; |
| 137 } | 137 } |
| 138 | 138 |
| 139 FontPlatformData FontResource::platformDataFromCustomData(float size, bool bold,
bool italic, FontOrientation orientation, FontWidthVariant widthVariant) | 139 FontPlatformData FontResource::platformDataFromCustomData(float size, bool bold,
bool italic, FontOrientation orientation) |
| 140 { | 140 { |
| 141 ASSERT(m_fontData); | 141 ASSERT(m_fontData); |
| 142 return m_fontData->fontPlatformData(size, bold, italic, orientation, widthVa
riant); | 142 return m_fontData->fontPlatformData(size, bold, italic, orientation); |
| 143 } | 143 } |
| 144 | 144 |
| 145 bool FontResource::isSafeToUnlock() const | 145 bool FontResource::isSafeToUnlock() const |
| 146 { | 146 { |
| 147 return m_data->hasOneRef(); | 147 return m_data->hasOneRef(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void FontResource::fontLoadWaitLimitCallback(Timer<FontResource>*) | 150 void FontResource::fontLoadWaitLimitCallback(Timer<FontResource>*) |
| 151 { | 151 { |
| 152 if (!isLoading()) | 152 if (!isLoading()) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 165 | 165 |
| 166 void FontResource::checkNotify() | 166 void FontResource::checkNotify() |
| 167 { | 167 { |
| 168 m_fontLoadWaitLimitTimer.stop(); | 168 m_fontLoadWaitLimitTimer.stop(); |
| 169 ResourceClientWalker<FontResourceClient> w(m_clients); | 169 ResourceClientWalker<FontResourceClient> w(m_clients); |
| 170 while (FontResourceClient* c = w.next()) | 170 while (FontResourceClient* c = w.next()) |
| 171 c->fontLoaded(this); | 171 c->fontLoaded(this); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } | 174 } |
| OLD | NEW |