diff options
author | 2021-11-18 17:00:37 +0000 | |
---|---|---|
committer | 2021-11-18 17:00:37 +0000 | |
commit | 10d9972786b9f564365b1f01af23b9df2ec00117 (patch) | |
tree | 9ca125a8245bdbd608c4e999b9ba287dcdd3bfcb /libs/hwui/RenderNode.cpp | |
parent | d353c81c5c50494d66c8b4bce3294b3b8c86a38b (diff) | |
parent | 0f473ac71a8dcefa15f377fe44c4f6003b6a518b (diff) |
Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I13199bc39e9445929195f3d15579cbffe94e92b0
Change-Id: I35fa3c6c2abf679c51033f1395a08d511ed8739f
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r-- | libs/hwui/RenderNode.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 0c422df65881..b348a6ecaae4 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -341,6 +341,7 @@ std::optional<RenderNode::SnapshotResult> RenderNode::updateSnapshotIfRequired( sk_sp<SkImage> snapshot = layerSurface->makeImageSnapshot(); const auto subset = SkIRect::MakeWH(properties().getWidth(), properties().getHeight()); + uint32_t layerSurfaceGenerationId = layerSurface->generationID(); // If we don't have an ImageFilter just return the snapshot if (imageFilter == nullptr) { mSnapshotResult.snapshot = snapshot; @@ -348,9 +349,10 @@ std::optional<RenderNode::SnapshotResult> RenderNode::updateSnapshotIfRequired( mSnapshotResult.outOffset = SkIPoint::Make(0.0f, 0.0f); mImageFilterClipBounds = clipBounds; mTargetImageFilter = nullptr; - } else if (mSnapshotResult.snapshot == nullptr || - imageFilter != mTargetImageFilter.get() || - mImageFilterClipBounds != clipBounds) { + mTargetImageFilterLayerSurfaceGenerationId = 0; + } else if (mSnapshotResult.snapshot == nullptr || imageFilter != mTargetImageFilter.get() || + mImageFilterClipBounds != clipBounds || + mTargetImageFilterLayerSurfaceGenerationId != layerSurfaceGenerationId) { // Otherwise create a new snapshot with the given filter and snapshot mSnapshotResult.snapshot = snapshot->makeWithFilter(context, @@ -361,6 +363,7 @@ std::optional<RenderNode::SnapshotResult> RenderNode::updateSnapshotIfRequired( &mSnapshotResult.outOffset); mTargetImageFilter = sk_ref_sp(imageFilter); mImageFilterClipBounds = clipBounds; + mTargetImageFilterLayerSurfaceGenerationId = layerSurfaceGenerationId; } return mSnapshotResult; |