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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTransformCache.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef PropertyTreeState_h 5 #ifndef PropertyTreeState_h
6 #define PropertyTreeState_h 6 #define PropertyTreeState_h
7 7
8 #include "platform/graphics/paint/ClipPaintPropertyNode.h" 8 #include "platform/graphics/paint/ClipPaintPropertyNode.h"
9 #include "platform/graphics/paint/EffectPaintPropertyNode.h" 9 #include "platform/graphics/paint/EffectPaintPropertyNode.h"
10 #include "platform/graphics/paint/TransformPaintPropertyNode.h" 10 #include "platform/graphics/paint/TransformPaintPropertyNode.h"
11 #include "wtf/HashFunctions.h" 11 #include "wtf/HashFunctions.h"
12 #include "wtf/HashTraits.h" 12 #include "wtf/HashTraits.h"
13 #include "wtf/text/StringBuilder.h" 13 #include "wtf/text/StringBuilder.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 // A complete set of paint properties including those that are inherited from 17 // A complete set of paint properties including those that are inherited from
18 // other objects. RefPtrs are used to guard against use-after-free bugs and 18 // other objects. RefPtrs are used to guard against use-after-free bugs and
19 // DCHECKs ensure PropertyTreeState never retains the last reference to a 19 // DCHECKs ensure PropertyTreeState never retains the last reference to a
20 // property tree node. 20 // property tree node.
21 class PLATFORM_EXPORT PropertyTreeState { 21 class PLATFORM_EXPORT PropertyTreeState {
chrishtr 2017/03/29 16:08:58 *PaintPropertyNode also?
pdr. 2017/03/29 16:16:26 I think we're good here because PaintPropertyNodes
22 USING_FAST_MALLOC(PropertyTreeState);
23
22 public: 24 public:
23 PropertyTreeState(const TransformPaintPropertyNode* transform, 25 PropertyTreeState(const TransformPaintPropertyNode* transform,
24 const ClipPaintPropertyNode* clip, 26 const ClipPaintPropertyNode* clip,
25 const EffectPaintPropertyNode* effect) 27 const EffectPaintPropertyNode* effect)
26 : m_transform(transform), m_clip(clip), m_effect(effect) { 28 : m_transform(transform), m_clip(clip), m_effect(effect) {
27 DCHECK(!m_transform || !m_transform->hasOneRef()); 29 DCHECK(!m_transform || !m_transform->hasOneRef());
28 DCHECK(!m_clip || !m_clip->hasOneRef()); 30 DCHECK(!m_clip || !m_clip->hasOneRef());
29 DCHECK(!m_effect || !m_effect->hasOneRef()); 31 DCHECK(!m_effect || !m_effect->hasOneRef());
30 } 32 }
31 33
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 178 }
177 179
178 HashMap<const PropertyTreeNode*, String> m_nodeToDebugString; 180 HashMap<const PropertyTreeNode*, String> m_nodeToDebugString;
179 }; 181 };
180 182
181 #endif 183 #endif
182 184
183 } // namespace blink 185 } // namespace blink
184 186
185 #endif // PropertyTreeState_h 187 #endif // PropertyTreeState_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTransformCache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698