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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/GeometryMapperClipCache.h

Issue 2783913002: Start USING_FAST_MALLOC for more paint data structures (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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698