OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2015 Google Inc. All rights reserved. | 3 * Copyright (C) 2015 Google Inc. All rights reserved. |
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 20 matching lines...) Expand all Loading... |
31 #include "platform/text/TextRun.h" | 31 #include "platform/text/TextRun.h" |
32 #include "wtf/Forward.h" | 32 #include "wtf/Forward.h" |
33 #include "wtf/HashFunctions.h" | 33 #include "wtf/HashFunctions.h" |
34 #include "wtf/HashSet.h" | 34 #include "wtf/HashSet.h" |
35 #include "wtf/HashTableDeletedValueType.h" | 35 #include "wtf/HashTableDeletedValueType.h" |
36 #include "wtf/StringHasher.h" | 36 #include "wtf/StringHasher.h" |
37 #include "wtf/WeakPtr.h" | 37 #include "wtf/WeakPtr.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class Font; | |
42 | |
43 struct ShapeCacheEntry { | 41 struct ShapeCacheEntry { |
44 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 42 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
45 ShapeCacheEntry() { m_shapeResult = nullptr; } | 43 ShapeCacheEntry() { m_shapeResult = nullptr; } |
46 RefPtr<const ShapeResult> m_shapeResult; | 44 RefPtr<const ShapeResult> m_shapeResult; |
47 }; | 45 }; |
48 | 46 |
49 class ShapeCache { | 47 class ShapeCache { |
50 USING_FAST_MALLOC(ShapeCache); | 48 USING_FAST_MALLOC(ShapeCache); |
51 WTF_MAKE_NONCOPYABLE(ShapeCache); | 49 WTF_MAKE_NONCOPYABLE(ShapeCache); |
52 | 50 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 inline bool operator==(const ShapeCache::SmallStringKey& a, | 247 inline bool operator==(const ShapeCache::SmallStringKey& a, |
250 const ShapeCache::SmallStringKey& b) { | 248 const ShapeCache::SmallStringKey& b) { |
251 if (a.length() != b.length() || a.direction() != b.direction()) | 249 if (a.length() != b.length() || a.direction() != b.direction()) |
252 return false; | 250 return false; |
253 return WTF::equal(a.characters(), b.characters(), a.length()); | 251 return WTF::equal(a.characters(), b.characters(), a.length()); |
254 } | 252 } |
255 | 253 |
256 } // namespace blink | 254 } // namespace blink |
257 | 255 |
258 #endif // ShapeCache_h | 256 #endif // ShapeCache_h |
OLD | NEW |