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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/opentype/FontSettings.cpp

Issue 2795413003: Rewrite references to "wtf/" to "platform/wtf/" in platform/fonts. (Closed)
Patch Set: Created 3 years, 8 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "platform/fonts/opentype/FontSettings.h" 5 #include "platform/fonts/opentype/FontSettings.h"
6 6
7 #include "wtf/HashFunctions.h" 7 #include "platform/wtf/HashFunctions.h"
8 #include "wtf/StringHasher.h" 8 #include "platform/wtf/StringHasher.h"
9 #include "wtf/text/AtomicStringHash.h" 9 #include "platform/wtf/text/AtomicStringHash.h"
10 #include "wtf/text/StringHash.h" 10 #include "platform/wtf/text/StringHash.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 uint32_t atomicStringToFourByteTag(AtomicString tag) { 14 uint32_t atomicStringToFourByteTag(AtomicString tag) {
15 DCHECK_EQ(tag.length(), 4u); 15 DCHECK_EQ(tag.length(), 4u);
16 return (((tag[0]) << 24) | ((tag[1]) << 16) | ((tag[2]) << 8) | (tag[3])); 16 return (((tag[0]) << 24) | ((tag[1]) << 16) | ((tag[2]) << 8) | (tag[3]));
17 } 17 }
18 18
19 static inline void addToHash(unsigned& hash, unsigned key) { 19 static inline void addToHash(unsigned& hash, unsigned key) {
20 hash = ((hash << 5) + hash) + key; // Djb2 20 hash = ((hash << 5) + hash) + key; // Djb2
(...skipping 12 matching lines...) Expand all
33 for (unsigned j = 0; j < tag.length(); j++) { 33 for (unsigned j = 0; j < tag.length(); j++) {
34 stringHasher.addCharacter(tag[j]); 34 stringHasher.addCharacter(tag[j]);
35 } 35 }
36 addToHash(computedHash, stringHasher.hash()); 36 addToHash(computedHash, stringHasher.hash());
37 addFloatToHash(computedHash, at(i).value()); 37 addFloatToHash(computedHash, at(i).value());
38 } 38 }
39 return computedHash; 39 return computedHash;
40 } 40 }
41 41
42 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698