[gnome-shell] windowManager: Use MetaWindowActor.paint_to_content() for window effects
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] windowManager: Use MetaWindowActor.paint_to_content() for window effects
- Date: Sat, 4 Sep 2021 10:15:44 +0000 (UTC)
commit 36a1fb78cddf4be8b26430ff3ab998600356f075
Author: Robert Mader <robert mader posteo de>
Date: Sun Jun 6 14:29:47 2021 +0200
windowManager: Use MetaWindowActor.paint_to_content() for window effects
Previously we used `get_image()`, which returned `cairo_surface`,
in order to create a `ClutterContent` with a screenshot of the
`MetaWindowActor`. This added a roundtrip from GPU to CPU memory.
Instead, use the new `paint_to_content()` API which lets us use a
`CoglTexture` directly as source of our `ClutterContent`.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1879>
js/ui/windowManager.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index c485fd0f99..caaecec410 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1283,7 +1283,7 @@ var WindowManager = class {
_prepareAnimationInfo(shellwm, actor, oldFrameRect, _change) {
// Position a clone of the window on top of the old position,
// while actor updates are frozen.
- let actorContent = Shell.util_get_content_for_window_actor(actor, oldFrameRect);
+ let actorContent = actor.paint_to_content(oldFrameRect);
let actorClone = new St.Widget({ content: actorContent });
actorClone.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
actorClone.set_position(oldFrameRect.x, oldFrameRect.y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]