• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef RENDER_SERVICE_CLIENT_CORE_PIPELINE_RS_RENDER_NODE_H
16 #define RENDER_SERVICE_CLIENT_CORE_PIPELINE_RS_RENDER_NODE_H
17 
18 #include <atomic>
19 #include <cstdint>
20 #include <functional>
21 #include <list>
22 #include <memory>
23 #include <mutex>
24 #include <unordered_set>
25 #include <unordered_map>
26 #include <variant>
27 #include <vector>
28 
29 #include "animation/rs_animation_manager.h"
30 #include "animation/rs_frame_rate_range.h"
31 #include "common/rs_common_def.h"
32 #include "common/rs_macros.h"
33 #include "common/rs_rect.h"
34 #include "modifier/rs_render_modifier.h"
35 #include "pipeline/rs_dirty_region_manager.h"
36 #include "pipeline/rs_paint_filter_canvas.h"
37 #include "property/rs_properties.h"
38 
39 #ifndef USE_ROSEN_DRAWING
40 #include "include/core/SkRefCnt.h"
41 #include "include/core/SkSurface.h"
42 #include "include/gpu/GrBackendSurface.h"
43 #else
44 #include "draw/surface.h"
45 #include "image/gpu_context.h"
46 #endif
47 
48 #ifndef USE_ROSEN_DRAWING
49 class SkCanvas;
50 #endif
51 namespace OHOS {
52 namespace Rosen {
53 class DrawCmdList;
54 class RSContext;
55 class RSNodeVisitor;
56 class RSCommand;
57 
58 class RSB_EXPORT RSRenderNode : public std::enable_shared_from_this<RSRenderNode>  {
59 public:
60 
61     using WeakPtr = std::weak_ptr<RSRenderNode>;
62     using SharedPtr = std::shared_ptr<RSRenderNode>;
63     static inline constexpr RSRenderNodeType Type = RSRenderNodeType::RS_NODE;
GetType()64     virtual RSRenderNodeType GetType() const
65     {
66         return Type;
67     }
68 
id_(id)69     explicit RSRenderNode(NodeId id, std::weak_ptr<RSContext> context = {}) : id_(id), context_(context) {};
id_(id)70     explicit RSRenderNode(NodeId id, bool isOnTheTree, std::weak_ptr<RSContext> context = {}) : id_(id),
71         isOnTheTree_(isOnTheTree), context_(context) {};
72     RSRenderNode(const RSRenderNode&) = delete;
73     RSRenderNode(const RSRenderNode&&) = delete;
74     RSRenderNode& operator=(const RSRenderNode&) = delete;
75     RSRenderNode& operator=(const RSRenderNode&&) = delete;
76     virtual ~RSRenderNode();
77 
78     void AddChild(SharedPtr child, int index = -1);
79     void MoveChild(SharedPtr child, int index);
80     void RemoveChild(SharedPtr child, bool skipTransition = false);
81     void ClearChildren();
82     void RemoveFromTree(bool skipTransition = false);
83 
84     // Add/RemoveCrossParentChild only used as: the child is under multiple parents(e.g. a window cross multi-screens)
85     void AddCrossParentChild(const SharedPtr& child, int32_t index = -1);
86     void RemoveCrossParentChild(const SharedPtr& child, const WeakPtr& newParent);
87 
88     virtual void CollectSurface(const std::shared_ptr<RSRenderNode>& node,
89                                 std::vector<RSRenderNode::SharedPtr>& vec,
90                                 bool isUniRender,
91                                 bool onlyFirstLevel);
92     virtual void Prepare(const std::shared_ptr<RSNodeVisitor>& visitor);
93     virtual void Process(const std::shared_ptr<RSNodeVisitor>& visitor);
94     virtual bool IsDirty() const;
95     // attention: current all base node's dirty ops causing content dirty
96     // if there is any new dirty op, check it
97     virtual bool IsContentDirty() const;
98     virtual void SetContentDirty();
99 
100     WeakPtr GetParent() const;
101 
GetId()102     inline NodeId GetId() const
103     {
104         return id_;
105     }
106 
107     virtual void SetIsOnTheTree(bool flag, NodeId instanceRootNodeId = INVALID_NODEID);
108     bool IsOnTheTree() const;
109 
110     // return children and disappeared children, not guaranteed to be sorted by z-index
111     const std::list<SharedPtr>& GetChildren();
112     // return children and disappeared children, sorted by z-index
113     const std::list<SharedPtr>& GetSortedChildren();
114     uint32_t GetChildrenCount() const;
115 
116     void DumpTree(int32_t depth, std::string& ou) const;
117 
118     virtual bool HasDisappearingTransition(bool recursive = true) const;
119 
120     void SetTunnelHandleChange(bool change);
121     bool GetTunnelHandleChange() const;
122 
123     // type-safe reinterpret_cast
124     template<typename T>
IsInstanceOf()125     bool IsInstanceOf() const
126     {
127         constexpr uint32_t targetType = static_cast<uint32_t>(T::Type);
128         return (static_cast<uint32_t>(GetType()) & targetType) == targetType;
129     }
130     template<typename T>
ReinterpretCast(std::shared_ptr<RSRenderNode> node)131     static std::shared_ptr<T> ReinterpretCast(std::shared_ptr<RSRenderNode> node)
132     {
133         return node ? node->ReinterpretCastTo<T>() : nullptr;
134     }
135     template<typename T>
ReinterpretCastTo()136     std::shared_ptr<T> ReinterpretCastTo()
137     {
138         return (IsInstanceOf<T>()) ? std::static_pointer_cast<T>(shared_from_this()) : nullptr;
139     }
140 
141     bool HasChildrenOutOfRect() const;
142     void UpdateChildrenOutOfRectFlag(bool flag);
143 
144     void ResetHasRemovedChild();
145     bool HasRemovedChild() const;
146     void ResetChildrenRect();
147     RectI GetChildrenRect() const;
148 
149     bool ChildHasFilter() const;
150     void SetChildHasFilter(bool childHasFilter);
151 
152     NodeId GetInstanceRootNodeId() const;
153 
154     // accumulate all valid children's area
155     void UpdateChildrenRect(const RectI& subRect);
156     void SetDirty();
157 
AddDirtyType(RSModifierType type)158     void AddDirtyType(RSModifierType type)
159     {
160         dirtyTypes_.emplace(type);
161     }
162 
163     virtual std::pair<bool, bool> Animate(int64_t timestamp);
164 
165     bool IsClipBound() const;
166     // clipRect has value in UniRender when calling PrepareCanvasRenderNode, else it is nullopt
167     bool Update(RSDirtyRegionManager& dirtyManager, const std::shared_ptr<RSRenderNode>& parent, bool parentDirty,
168         bool isClipBoundDirty = false, std::optional<RectI> clipRect = std::nullopt);
169 #ifndef USE_ROSEN_DRAWING
GetContextClipRegion()170     virtual std::optional<SkRect> GetContextClipRegion() const { return std::nullopt; }
171 #else
GetContextClipRegion()172     virtual std::optional<Drawing::Rect> GetContextClipRegion() const { return std::nullopt; }
173 #endif
174 
175     RSProperties& GetMutableRenderProperties();
176     const RSProperties& GetRenderProperties() const;
177     void UpdateRenderStatus(RectI& dirtyRegion, bool isPartialRenderEnabled);
178     bool IsRenderUpdateIgnored() const;
179 
180     // used for animation test
181     RSAnimationManager& GetAnimationManager();
182 
183     void ApplyBoundsGeometry(RSPaintFilterCanvas& canvas);
184     virtual void ProcessTransitionBeforeChildren(RSPaintFilterCanvas& canvas);
ProcessAnimatePropertyBeforeChildren(RSPaintFilterCanvas & canvas)185     virtual void ProcessAnimatePropertyBeforeChildren(RSPaintFilterCanvas& canvas) {}
186     virtual void ProcessRenderBeforeChildren(RSPaintFilterCanvas& canvas);
187 
ProcessRenderContents(RSPaintFilterCanvas & canvas)188     virtual void ProcessRenderContents(RSPaintFilterCanvas& canvas) {}
189 
190     virtual void ProcessTransitionAfterChildren(RSPaintFilterCanvas& canvas);
ProcessAnimatePropertyAfterChildren(RSPaintFilterCanvas & canvas)191     virtual void ProcessAnimatePropertyAfterChildren(RSPaintFilterCanvas& canvas) {}
192     virtual void ProcessRenderAfterChildren(RSPaintFilterCanvas& canvas);
193 
194     void RenderTraceDebug() const;
195     bool ShouldPaint() const;
196 
197     RectI GetOldDirty() const;
198     RectI GetOldDirtyInSurface() const;
199     bool IsDirtyRegionUpdated() const;
200 
201     void AddModifier(const std::shared_ptr<RSRenderModifier> modifier);
202     void RemoveModifier(const PropertyId& id);
203     std::shared_ptr<RSRenderModifier> GetModifier(const PropertyId& id);
204 
205     void ApplyChildrenModifiers();
206 
207     bool IsShadowValidLastFrame() const;
SetShadowValidLastFrame(bool isShadowValidLastFrame)208     void SetShadowValidLastFrame(bool isShadowValidLastFrame)
209     {
210         isShadowValidLastFrame_ = isShadowValidLastFrame;
211     }
212 
213     // update parent's children rect including childRect and itself
214     void UpdateParentChildrenRect(std::shared_ptr<RSRenderNode> parentNode) const;
215     void UpdateFilterCacheManagerWithCacheRegion(const std::optional<RectI>& clipRect = std::nullopt) const;
216 
217     void SetStaticCached(bool isStaticCached);
218     bool IsStaticCached() const;
219 
220     bool NeedInitCacheSurface() const;
IsPureContainer()221     inline bool IsPureContainer() const
222     {
223         return (drawCmdModifiers_.empty() && !renderProperties_.isDrawn_);
224     }
225 
226 #ifndef USE_ROSEN_DRAWING
227     using ClearCacheSurfaceFunc = std::function<void(sk_sp<SkSurface>&, sk_sp<SkSurface>&, uint32_t, uint32_t)>;
228 #ifdef NEW_SKIA
229     void InitCacheSurface(GrRecordingContext* grContext, ClearCacheSurfaceFunc func = nullptr,
230         uint32_t threadIndex = UNI_MAIN_THREAD_INDEX);
231 #else
232     void InitCacheSurface(GrContext* grContext, ClearCacheSurfaceFunc func = nullptr,
233         uint32_t threadIndex = UNI_MAIN_THREAD_INDEX);
234 #endif
235 #else
236     using ClearCacheSurfaceFunc =
237         std::function<void(std::shared_ptr<Drawing::Surface>&, std::shared_ptr<Drawing::Surface>&, uint32_t, uint32_t)>;
238     void InitCacheSurface(Drawing::GPUContext* grContext, ClearCacheSurfaceFunc func = nullptr,
239         uint32_t threadIndex = UNI_MAIN_THREAD_INDEX);
240 #endif
241 
242     Vector2f GetOptionalBufferSize() const;
243 
244 #ifndef USE_ROSEN_DRAWING
GetCacheSurface()245     sk_sp<SkSurface> GetCacheSurface() const
246 #else
247     std::shared_ptr<Drawing::Surface> GetCacheSurface() const
248 #endif
249     {
250         std::scoped_lock<std::recursive_mutex> lock(surfaceMutex_);
251         return cacheSurface_;
252     }
253 
254 // use for uni render visitor
255 #ifndef USE_ROSEN_DRAWING
256     sk_sp<SkSurface> GetCacheSurface(uint32_t threadIndex, bool needCheckThread);
257 #else
258     std::shared_ptr<Drawing::Surface> GetCacheSurface(uint32_t threadIndex, bool needCheckThread);
259 #endif
260 
261     void UpdateCompletedCacheSurface();
262     void SetTextureValidFlag(bool isValid);
263 #ifndef USE_ROSEN_DRAWING
264     sk_sp<SkSurface> GetCompletedCacheSurface(uint32_t threadIndex = UNI_MAIN_THREAD_INDEX,
265         bool needCheckThread = true);
266 #else
267     std::shared_ptr<Drawing::Surface> GetCompletedCacheSurface(uint32_t threadIndex = UNI_MAIN_THREAD_INDEX,
268         bool needCheckThread = true);
269 #endif
270     void ClearCacheSurface();
271 
272 #ifdef RS_ENABLE_GL
273     void UpdateBackendTexture();
274 #endif
275 
276     void DrawCacheSurface(RSPaintFilterCanvas& canvas, uint32_t threadIndex = UNI_MAIN_THREAD_INDEX,
277         bool isUIFirst = false);
278 
279     void SetCacheType(CacheType cacheType);
280     CacheType GetCacheType() const;
281 
SetCacheSurfaceNeedUpdated(bool isCacheSurfaceNeedUpdate)282     void SetCacheSurfaceNeedUpdated(bool isCacheSurfaceNeedUpdate)
283     {
284         isCacheSurfaceNeedUpdate_ = isCacheSurfaceNeedUpdate;
285     }
286 
GetCacheSurfaceNeedUpdated()287     bool GetCacheSurfaceNeedUpdated() const
288     {
289         return isCacheSurfaceNeedUpdate_;
290     }
291 
292     int GetShadowRectOffsetX() const;
293     int GetShadowRectOffsetY() const;
294 
295     void SetDrawingCacheType(RSDrawingCacheType cacheType);
296     RSDrawingCacheType GetDrawingCacheType() const;
297 
298     void SetDrawingCacheChanged(bool cacheChanged);
299     bool GetDrawingCacheChanged() const;
300 
301     // driven render ///////////////////////////////////
302     void SetIsMarkDriven(bool isMarkDriven);
303     bool IsMarkDriven() const;
304     void SetIsMarkDrivenRender(bool isMarkDrivenRender);
305     bool IsMarkDrivenRender() const;
306 
307     void SetItemIndex(int index);
308     int GetItemIndex() const;
309 
310     void SetPaintState(bool paintState);
311     bool GetPaintState() const;
312 
313     void SetIsContentChanged(bool isChanged);
314     bool IsContentChanged() const;
315 
316     bool HasAnimation() const;
317 
318     bool HasFilter() const;
319     void SetHasFilter(bool hasFilter);
320 
321     std::recursive_mutex& GetSurfaceMutex() const;
322 
323     bool HasHardwareNode() const;
324     void SetHasHardwareNode(bool hasHardwareNode);
325 
326     bool HasAbilityComponent() const;
327     void SetHasAbilityComponent(bool hasAbilityComponent);
328     bool QuerySubAssignable(bool isRotation) const;
329 
330     uint32_t GetCacheSurfaceThreadIndex() const;
331 
332     uint32_t GetCompletedSurfaceThreadIndex() const;
333 
334     bool IsMainThreadNode() const;
335     void SetIsMainThreadNode(bool isMainThreadNode);
336 
337     bool IsScale() const;
338     void SetIsScale(bool isScale);
339 
340     void SetPriority(NodePriorityType priority);
341     NodePriorityType GetPriority();
342 
343     bool IsAncestorDirty() const;
344     void SetIsAncestorDirty(bool isAncestorDirty);
345 
346     bool HasCachedTexture() const;
347 
348     void SetDrawRegion(std::shared_ptr<RectF> rect);
349     std::shared_ptr<RectF> GetDrawRegion() const;
350 
351 #ifndef USE_ROSEN_DRAWING
352     void UpdateEffectRegion(std::optional<SkPath>& region) const;
353 #else
354     void UpdateEffectRegion(std::optional<Drawing::Path>& region) const;
355 #endif
356     // check node's rect if it has valid filter cache
357     bool IsFilterCacheValid() const;
358     void UpdateFilterCacheWithDirty(RSDirtyRegionManager& dirtyManager, bool isForeground=true) const;
359 
360     void CheckGroupableAnimation(const PropertyId& id, bool isAnimAdd);
361     bool IsForcedDrawInGroup() const;
362     bool IsSuggestedDrawInGroup() const;
363     void CheckDrawingCacheType();
HasCacheableAnim()364     bool HasCacheableAnim() const { return hasCacheableAnim_; }
365 
366     enum NodeGroupType {
367         NONE = 0,
368         GROUPED_BY_ANIM,
369         GROUPED_BY_UI,
370         GROUPED_BY_USER,
371     };
372     void MarkNodeGroup(NodeGroupType type, bool isNodeGroup);
373     NodeGroupType GetNodeGroupType();
374 
375     /////////////////////////////////////////////
376 
377     // shared transition params, in format <InNodeId, target weakPtr>, nullopt means no transition
378     using SharedTransitionParam = std::pair<NodeId, std::weak_ptr<RSRenderNode>>;
379     void SetSharedTransitionParam(const std::optional<SharedTransitionParam>&& sharedTransitionParam);
380     const std::optional<SharedTransitionParam>& GetSharedTransitionParam() const;
381 
382     void SetGlobalAlpha(float alpha);
383     float GetGlobalAlpha() const;
OnAlphaChanged()384     virtual void OnAlphaChanged() {}
385 
386     void SetRSFrameRateRange(FrameRateRange range);
387     FrameRateRange GetRSFrameRateRange();
388     void SetUIFrameRateRange(FrameRateRange range);
389     FrameRateRange GetUIFrameRateRange() const;
390 
391     void ResetRSFrameRateRange();
392     void ResetUIFrameRateRange();
393 
394     void MarkNonGeometryChanged();
395     std::vector<HgmModifierProfile> GetHgmModifierProfileList() const;
396     void SetRSFrameRateRangeByPreferred(int32_t preferred);
397     bool ApplyModifiers();
398 
399     virtual RectI GetFilterRect() const;
400 
401 protected:
OnApplyModifiers()402     virtual void OnApplyModifiers() {}
403 
404     enum class NodeDirty {
405         CLEAN = 0,
406         DIRTY,
407     };
408     virtual void SetClean();
409 
410     void DumpNodeType(std::string& out) const;
411 
GetContext()412     const std::weak_ptr<RSContext> GetContext() const
413     {
414         return context_;
415     }
416     virtual void OnTreeStateChanged();
417 
418     static void SendCommandFromRT(std::unique_ptr<RSCommand>& command, NodeId nodeId);
419     void AddGeometryModifier(const std::shared_ptr<RSRenderModifier> modifier);
420     RSPaintFilterCanvas::SaveStatus renderNodeSaveCount_;
421     std::map<RSModifierType, std::list<std::shared_ptr<RSRenderModifier>>> drawCmdModifiers_;
422     // if true, it means currently it's in partial render mode and this node is intersect with dirtyRegion
423     bool isRenderUpdateIgnored_ = false;
424     bool isShadowValidLastFrame_ = false;
425 
NodeIsUsedBySubThread()426     virtual bool NodeIsUsedBySubThread() const { return false; }
427 
428     virtual bool IsSelfDrawingNode() const;
429 
430 private:
431     NodeId id_;
432     NodeId instanceRootNodeId_ = INVALID_NODEID;
433 
434     WeakPtr parent_;
435     void SetParent(WeakPtr parent);
436     void ResetParent();
OnResetParent()437     virtual void OnResetParent() {}
438     bool isOnTheTree_ = false;
439 
440     std::list<WeakPtr> children_;
441     std::list<std::pair<SharedPtr, uint32_t>> disappearingChildren_;
442 
443     std::list<SharedPtr> fullChildrenList_;
444     bool isFullChildrenListValid_ = false;
445     bool isChildrenSorted_ = false;
446     void GenerateFullChildrenList();
447     void GenerateSortedChildren();
448     void SortChildren();
449 
450     const std::weak_ptr<RSContext> context_;
451     NodeDirty dirtyStatus_ = NodeDirty::DIRTY;
452     bool isContentDirty_ = false;
453     friend class RSRenderPropertyBase;
454     friend class RSRenderTransition;
455     std::atomic<bool> isTunnelHandleChange_ = false;
456     // accumulate all children's region rect for dirty merging when any child has been removed
457     bool hasRemovedChild_ = false;
458     bool hasChildrenOutOfRect_ = false;
459     RectI childrenRect_;
460     bool childHasFilter_ = false;  // only collect children filter status
461 
462     void InternalRemoveSelfFromDisappearingChildren();
463     void FallbackAnimationsToRoot();
464     void FilterModifiersByPid(pid_t pid);
465 
466     void UpdateDirtyRegion(RSDirtyRegionManager& dirtyManager, bool geoDirty, std::optional<RectI> clipRect);
467     void AddModifierProfile(std::shared_ptr<RSRenderModifier> modifier, float width, float height);
468 
469     bool isDirtyRegionUpdated_ = false;
470     bool isLastVisible_ = false;
471     bool fallbackAnimationOnDestroy_ = true;
472     uint32_t disappearingTransitionCount_ = 0;
473     RectI oldDirty_;
474     RectI oldDirtyInSurface_;
475     RSProperties renderProperties_;
476     RSAnimationManager animationManager_;
477     std::map<PropertyId, std::shared_ptr<RSRenderModifier>> modifiers_;
478     // bounds and frame modifiers must be unique
479     std::shared_ptr<RSRenderModifier> boundsModifier_;
480     std::shared_ptr<RSRenderModifier> frameModifier_;
481 
482 #ifndef USE_ROSEN_DRAWING
483     sk_sp<SkImage> GetCompletedImage(RSPaintFilterCanvas& canvas, uint32_t threadIndex, bool isUIFirst);
484     sk_sp<SkSurface> cacheSurface_ = nullptr;
485     sk_sp<SkSurface> cacheCompletedSurface_ = nullptr;
486 #else
487     std::shared_ptr<Drawing::Bitmap> cacheBitmap_ = nullptr;
488     std::shared_ptr<Drawing::Surface> cacheSurface_ = nullptr;
489     std::shared_ptr<Drawing::Surface> cacheCompletedSurface_ = nullptr;
490 #endif
491 #ifndef USE_ROSEN_DRAWING
492 #ifdef RS_ENABLE_GL
493     GrBackendTexture cacheBackendTexture_;
494     GrBackendTexture cacheCompletedBackendTexture_;
495     bool isTextureValid_ = false;
496 #endif
497 #endif
498     std::atomic<bool> isCacheSurfaceNeedUpdate_ = false;
499     std::atomic<bool> isStaticCached_ = false;
500     CacheType cacheType_ = CacheType::NONE;
501     // drawing group cache
502     RSDrawingCacheType drawingCacheType_ = RSDrawingCacheType::DISABLED_CACHE;
503     bool isDrawingCacheChanged_ = false;
504 
505     mutable std::recursive_mutex surfaceMutex_;
506     ClearCacheSurfaceFunc clearCacheSurfaceFunc_ = nullptr;
507     uint32_t cacheSurfaceThreadIndex_ = UNI_MAIN_THREAD_INDEX;
508     uint32_t completedSurfaceThreadIndex_ = UNI_MAIN_THREAD_INDEX;
509     bool isMainThreadNode_ = true;
510     bool isScale_ = false;
511     bool hasFilter_ = false;
512     bool hasHardwareNode_ = false;
513     bool hasAbilityComponent_ = false;
514     bool isAncestorDirty_ = false;
515     NodePriorityType priority_ = NodePriorityType::MAIN_PRIORITY;
516 
517     // driven render
518     int itemIndex_ = -1;
519     bool isMarkDriven_ = false;
520     bool isMarkDrivenRender_ = false;
521     bool paintState_ = false;
522     bool isContentChanged_ = false;
523     float globalAlpha_ = 1.0f;
524     std::optional<SharedTransitionParam> sharedTransitionParam_;
525 
526     std::shared_ptr<RectF> drawRegion_ = nullptr;
527     NodeGroupType nodeGroupType_ = NodeGroupType::NONE;
528 
529     // shadowRectOffset means offset between shadowRect and absRect of node
530     int shadowRectOffsetX_ = 0;
531     int shadowRectOffsetY_ = 0;
532     // Only use in RSRenderNode::DrawCacheSurface to calculate scale factor
533     float boundsWidth_ = 0.0f;
534     float boundsHeight_ = 0.0f;
535     std::unordered_set<RSModifierType> dirtyTypes_;
536     bool hasCacheableAnim_ = false;
537     bool geometryChangeNotPerceived_ = false;
538 
539     FrameRateRange rsRange_ = {0, 0, 0};
540     FrameRateRange uiRange_ = {0, 0, 0};
541 
542     int64_t lastTimestamp_ = -1;
543     int64_t lastApplyTimestamp_ = -1;
544     float timeDelta_ = -1;
545     std::unordered_map<PropertyId, std::variant<float, Vector2f>> propertyValueMap_;
546     std::vector<HgmModifierProfile> hgmModifierProfileList_;
547 
548     friend class RSRenderTransition;
549     friend class RSRenderNodeMap;
550     friend class RSProxyRenderNode;
551     friend class RSRenderNode;
552 };
553 // backward compatibility
554 using RSBaseRenderNode = RSRenderNode;
555 } // namespace Rosen
556 } // namespace OHOS
557 
558 #endif // RENDER_SERVICE_CLIENT_CORE_PIPELINE_RS_RENDER_NODE_H
559