Merge "Improve snapshot clearing consistency" into sc-dev
This commit is contained in:
@@ -455,8 +455,7 @@ void RenderNode::destroyLayers() {
|
|||||||
if (hasLayer()) {
|
if (hasLayer()) {
|
||||||
this->setLayerSurface(nullptr);
|
this->setLayerSurface(nullptr);
|
||||||
}
|
}
|
||||||
mSnapshotResult.snapshot = nullptr;
|
|
||||||
mTargetImageFilter = nullptr;
|
|
||||||
if (mDisplayList) {
|
if (mDisplayList) {
|
||||||
mDisplayList.updateChildren([](RenderNode* child) { child->destroyLayers(); });
|
mDisplayList.updateChildren([](RenderNode* child) { child->destroyLayers(); });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -330,6 +330,11 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
mSkiaLayer.reset();
|
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