Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontCacheKey.h

Issue 1962263002: Introduce FontCache content scaling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win layout test fix Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698