js/ui: Use Clutter.OffscreenRedirect.ON_IDLE
To bypass offscreening in cases where continuous animation is happening. Offscreening is slower in such cases so this reduces the render time of animations within offscreenable actors. On an i7-7700 this reduces the render time of boxpointers for example by 25-30%. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1025
This commit is contained in:
parent
e938986a74
commit
c0c027c608
@ -33,7 +33,7 @@ var BoxPointer = GObject.registerClass({
|
||||
_init(arrowSide, binProperties) {
|
||||
super._init();
|
||||
|
||||
this.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
|
||||
this.set_offscreen_redirect(Clutter.OffscreenRedirect.ON_IDLE);
|
||||
|
||||
this._arrowSide = arrowSide;
|
||||
this._userArrowSide = arrowSide;
|
||||
|
@ -353,7 +353,7 @@ var Dash = GObject.registerClass({
|
||||
clip_to_allocation: true });
|
||||
this._box._delegate = this;
|
||||
this._container.add_actor(this._box);
|
||||
this._container.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
|
||||
this._container.set_offscreen_redirect(Clutter.OffscreenRedirect.ON_IDLE);
|
||||
|
||||
this._showAppsIcon = new ShowAppsIcon();
|
||||
this._showAppsIcon.show(false);
|
||||
|
@ -108,7 +108,7 @@ class OverviewActor extends St.BoxLayout {
|
||||
track_hover: true,
|
||||
can_focus: true,
|
||||
});
|
||||
this._searchEntry.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
|
||||
this._searchEntry.set_offscreen_redirect(Clutter.OffscreenRedirect.ON_IDLE);
|
||||
let searchEntryBin = new St.Bin({
|
||||
child: this._searchEntry,
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
|
@ -788,7 +788,7 @@ class Panel extends St.Widget {
|
||||
super._init({ name: 'panel',
|
||||
reactive: true });
|
||||
|
||||
this.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
|
||||
this.set_offscreen_redirect(Clutter.OffscreenRedirect.ON_IDLE);
|
||||
|
||||
this._sessionStyle = null;
|
||||
|
||||
|
@ -1256,7 +1256,7 @@ var WindowManager = class {
|
||||
// while actor updates are frozen.
|
||||
let actorContent = Shell.util_get_content_for_window_actor(actor, oldFrameRect);
|
||||
let actorClone = new St.Widget({ content: actorContent });
|
||||
actorClone.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
|
||||
actorClone.set_offscreen_redirect(Clutter.OffscreenRedirect.ON_IDLE);
|
||||
actorClone.set_position(oldFrameRect.x, oldFrameRect.y);
|
||||
actorClone.set_size(oldFrameRect.width, oldFrameRect.height);
|
||||
Main.uiGroup.add_actor(actorClone);
|
||||
|
Loading…
Reference in New Issue
Block a user