| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 bool isHashTableDeletedValue() const | 78 bool isHashTableDeletedValue() const |
| 79 { | 79 { |
| 80 return m_fontSize == hashTableDeletedSize(); | 80 return m_fontSize == hashTableDeletedSize(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 static unsigned precisionMultiplier() | 83 static unsigned precisionMultiplier() |
| 84 { | 84 { |
| 85 return s_fontSizePrecisionMultiplier; | 85 return s_fontSizePrecisionMultiplier; |
| 86 } | 86 } |
| 87 | 87 |
| 88 void clearFontSize() |
| 89 { |
| 90 m_fontSize = 0; |
| 91 } |
| 92 |
| 88 private: | 93 private: |
| 89 static unsigned hashTableDeletedSize() | 94 static unsigned hashTableDeletedSize() |
| 90 { | 95 { |
| 91 return 0xFFFFFFFFU; | 96 return 0xFFFFFFFFU; |
| 92 } | 97 } |
| 93 | 98 |
| 94 FontFaceCreationParams m_creationParams; | 99 FontFaceCreationParams m_creationParams; |
| 95 unsigned m_fontSize; | 100 unsigned m_fontSize; |
| 96 unsigned m_options; | 101 unsigned m_options; |
| 97 }; | 102 }; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 111 static const bool safeToCompareToEmptyOrDeleted = true; | 116 static const bool safeToCompareToEmptyOrDeleted = true; |
| 112 }; | 117 }; |
| 113 | 118 |
| 114 struct FontCacheKeyTraits : WTF::SimpleClassHashTraits<FontCacheKey> { | 119 struct FontCacheKeyTraits : WTF::SimpleClassHashTraits<FontCacheKey> { |
| 115 STATIC_ONLY(FontCacheKeyTraits); | 120 STATIC_ONLY(FontCacheKeyTraits); |
| 116 }; | 121 }; |
| 117 | 122 |
| 118 } // namespace blink | 123 } // namespace blink |
| 119 | 124 |
| 120 #endif // FontCacheKey_h | 125 #endif // FontCacheKey_h |
| OLD | NEW |