Merge "Improve snapshot clearing consistency" into sc-dev
This commit is contained in:
@@ -455,8 +455,7 @@ void RenderNode::destroyLayers() {
|
||||
if (hasLayer()) {
|
||||
this->setLayerSurface(nullptr);
|
||||
}
|
||||
mSnapshotResult.snapshot = nullptr;
|
||||
mTargetImageFilter = nullptr;
|
||||
|
||||
if (mDisplayList) {
|
||||
mDisplayList.updateChildren([](RenderNode* child) { child->destroyLayers(); });
|
||||
}
|
||||
|
||||
@@ -330,6 +330,11 @@ public:
|
||||
} else {
|
||||
mSkiaLayer.reset();
|
||||
}
|
||||
|
||||
// Clear out the previous snapshot and the image filter the previous
|
||||
// snapshot was created with whenever the layer changes.
|
||||
mSnapshotResult.snapshot = nullptr;
|
||||
mTargetImageFilter = nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user