mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
background: don't use raise_top() since it's costly
We currently resync the stacking order of the two key frames every iteration of the animation. This is costly and unnecessary. This commit ensures they're stacked properly up front and doesn't touch them after that. https://bugzilla.gnome.org/show_bug.cgi?id=694993
This commit is contained in:
parent
1566a4e607
commit
020128b9ca
1 changed files with 2 additions and 4 deletions
|
|
@ -356,7 +356,7 @@ const Background = new Lang.Class({
|
|||
|
||||
let actor = new Meta.BackgroundActor();
|
||||
actor.content = content;
|
||||
this.actor.add_child(actor);
|
||||
this.actor.insert_child_at_index(actor, index);
|
||||
|
||||
this._images[index] = actor;
|
||||
this._watchCacheFile(filename);
|
||||
|
|
@ -372,10 +372,8 @@ const Background = new Lang.Class({
|
|||
},
|
||||
|
||||
_updateAnimationProgress: function() {
|
||||
if (this._images[1]) {
|
||||
this._images[1].raise_top();
|
||||
if (this._images[1])
|
||||
this._images[1].opacity = this._animation.transitionProgress * 255;
|
||||
}
|
||||
|
||||
this._queueAnimationUpdate();
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue