[gnome-shell] Use Meta.BackgroundActor instances instead of cloning global.background_actor
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Use Meta.BackgroundActor instances instead of cloning global.background_actor
- Date: Mon, 29 Aug 2011 18:19:41 +0000 (UTC)
commit 82ce8fe3ff2316af559e3d62d1858f18c4a91007
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Aug 29 02:37:41 2011 +0100
Use Meta.BackgroundActor instances instead of cloning global.background_actor
Instances of this class share a single CoglTexture behind the scenes which
allows us to show the background with different rendering options without
duplicating the texture data.
https://bugzilla.gnome.org/show_bug.cgi?id=656433
js/ui/overview.js | 9 ++++++---
js/ui/workspaceThumbnail.js | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 0c5ea32..4ecc378 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -115,9 +115,12 @@ Overview.prototype = {
return;
}
- // The actual global.background_actor is inside global.window_group,
- // which is hidden when displaying the overview, so we display a clone.
- this._background = new Clutter.Clone({ source: global.background_actor });
+ // The main BackgroundActor is inside global.window_group which is
+ // hidden when displaying the overview, so we create a new
+ // one. Instances of this class share a single CoglTexture behind the
+ // scenes which allows us to show the background with different
+ // rendering options without duplicating the texture data.
+ this._background = Meta.BackgroundActor.new_for_screen(global.screen);
this._background.hide();
global.overlay_group.add_actor(this._background);
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 582842b..7a239ef 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -167,7 +167,7 @@ WorkspaceThumbnail.prototype = {
return true;
}));
- this._background = new Clutter.Clone({ source: global.background_actor });
+ this._background = Meta.BackgroundActor.new_for_screen(global.screen);
this._contents.add_actor(this._background);
let monitor = Main.layoutManager.primaryMonitor;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]