| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef GeometryMapperClipCache_h | 5 #ifndef GeometryMapperClipCache_h |
| 6 #define GeometryMapperClipCache_h | 6 #define GeometryMapperClipCache_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/graphics/paint/FloatClipRect.h" | 9 #include "platform/graphics/paint/FloatClipRect.h" |
| 10 #include "wtf/Vector.h" | 10 #include "wtf/Vector.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class ClipPaintPropertyNode; | 14 class ClipPaintPropertyNode; |
| 15 class FloatClipRect; | 15 class FloatClipRect; |
| 16 class TransformPaintPropertyNode; | 16 class TransformPaintPropertyNode; |
| 17 | 17 |
| 18 // A GeometryMapperClipCache hangs off a ClipPaintPropertyNode. It stores | 18 // A GeometryMapperClipCache hangs off a ClipPaintPropertyNode. It stores |
| 19 // cached "clip visual rects" (See GeometryMapper.h) from that node in | 19 // cached "clip visual rects" (See GeometryMapper.h) from that node in |
| 20 // ancestor spaces. | 20 // ancestor spaces. |
| 21 class PLATFORM_EXPORT GeometryMapperClipCache { | 21 class PLATFORM_EXPORT GeometryMapperClipCache { |
| 22 USING_FAST_MALLOC(GeometryMapperClipCache); |
| 23 |
| 22 public: | 24 public: |
| 23 GeometryMapperClipCache(); | 25 GeometryMapperClipCache(); |
| 24 | 26 |
| 25 struct ClipAndTransform { | 27 struct ClipAndTransform { |
| 26 const ClipPaintPropertyNode* ancestorClip; | 28 const ClipPaintPropertyNode* ancestorClip; |
| 27 const TransformPaintPropertyNode* ancestorTransform; | 29 const TransformPaintPropertyNode* ancestorTransform; |
| 28 bool operator==(const ClipAndTransform& other) const { | 30 bool operator==(const ClipAndTransform& other) const { |
| 29 return ancestorClip == other.ancestorClip && | 31 return ancestorClip == other.ancestorClip && |
| 30 ancestorTransform == other.ancestorTransform; | 32 ancestorTransform == other.ancestorTransform; |
| 31 } | 33 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 59 | 61 |
| 60 Vector<ClipCacheEntry> m_clipCache; | 62 Vector<ClipCacheEntry> m_clipCache; |
| 61 unsigned m_cacheGeneration; | 63 unsigned m_cacheGeneration; |
| 62 | 64 |
| 63 DISALLOW_COPY_AND_ASSIGN(GeometryMapperClipCache); | 65 DISALLOW_COPY_AND_ASSIGN(GeometryMapperClipCache); |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 } // namespace blink | 68 } // namespace blink |
| 67 | 69 |
| 68 #endif // GeometryMapperClipCache_h | 70 #endif // GeometryMapperClipCache_h |
| OLD | NEW |