Line tweaker (#2050)
This commit is contained in:
@@ -70,31 +70,6 @@ std::optional<Color> RenderLayer::getSolidBackground() const {
|
||||
}
|
||||
|
||||
#if MLN_DRAWABLE_RENDERER
|
||||
void RenderLayer::replaceTweaker(LayerTweakerPtr& curTweaker,
|
||||
LayerTweakerPtr newTweaker,
|
||||
const std::vector<LayerGroupBasePtr>& layerGroups) {
|
||||
const auto prevTweaker = curTweaker;
|
||||
|
||||
// We need to re-create the tweaker because it doesn't yet support modifying evaluated
|
||||
// properties, but we don't want to stop updating drawables (as in the `layerChanged` case)
|
||||
// so we need to update the tweaker reference on the outstanding drawables so that they
|
||||
// pass the check in `updateExisting`.
|
||||
// TODO: Once the tweaker doesn't need to be re-created on each property evaluation, this won't be needed.
|
||||
for (const auto& group : layerGroups) {
|
||||
if (group) {
|
||||
group->addLayerTweaker(newTweaker);
|
||||
|
||||
visitLayerGroupDrawables(*group, [&](gfx::Drawable& drawable) {
|
||||
if (drawable.getLayerTweaker() == prevTweaker) {
|
||||
drawable.setLayerTweaker(newTweaker);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
curTweaker = std::move(newTweaker);
|
||||
}
|
||||
|
||||
void RenderLayer::layerChanged(const TransitionParameters&,
|
||||
const Immutable<style::Layer::Impl>&,
|
||||
UniqueChangeRequestVec&) {
|
||||
|
||||
Reference in New Issue
Block a user