diff options
author | 2024-01-22 19:46:22 +0800 | |
---|---|---|
committer | 2024-01-22 20:04:09 +0800 | |
commit | 13d879bc05b98cfac2cdd13d43bdd071ac37fd01 (patch) | |
tree | 144c033fdc531841fd70a64c4501304c5fb400a0 /libs/hwui/RenderNode.h | |
parent | 583bc7179d830789c474583233001ff430b0d4ff (diff) |
Fix the problem that mDamageGenerationId is a random value
1. mDamageGenerationId is a random value when initialized. When this random value happens to be equal to info.damageGenerationId, the dirty range will reach the maximum DIRTY_MAX.
2. When info.damageGenerationId is equal to 0, which is when the first frame of the APP is drawn, there is no need to reach the maximum DIRTY_MAX in the dirty range.
Bug: 321612817
Test: build
Change-Id: Iab6a04170926d10cdf2a62ae0fbf9cbe5eeb8bbf
Signed-off-by: qiubowen <qiubowen@xiaomi.com>
Diffstat (limited to 'libs/hwui/RenderNode.h')
-rw-r--r-- | libs/hwui/RenderNode.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h index 572635a9bd45..4d03bf189a84 100644 --- a/libs/hwui/RenderNode.h +++ b/libs/hwui/RenderNode.h @@ -263,7 +263,7 @@ private: DisplayList mDisplayList; DisplayList mStagingDisplayList; - int64_t mDamageGenerationId; + int64_t mDamageGenerationId = 0; friend class AnimatorManager; AnimatorManager mAnimatorManager; |