[gnome-shell] background: don't use raise_top() since it's costly
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] background: don't use raise_top() since it's costly
- Date: Tue, 5 Mar 2013 21:03:17 +0000 (UTC)
commit 020128b9ca801f87f158e921f14f0ae585334008
Author: Ray Strode <rstrode redhat com>
Date: Tue Mar 5 15:39:29 2013 -0500
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
js/ui/background.js | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 74e398e..6d6089b 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -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();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]