[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: Re: [PATCH xwayland 1/3] xwayland: Separate DamagePtr into separate window data
From: Adam Jackson <ajax () nwnk ! net>
Date: 2019-01-16 19:11:44
Message-ID: 22e5c5430df777270367311e0a548314edb0234f.camel () nwnk ! net
[Download RAW message or body]
On Tue, 2019-01-15 at 23:21 +0100, Carlos Garnacho wrote:
> This will be dissociated in future commits to handle the cases
> where windows are being realized before there is a compositor
> handling redirection.
>
> In that case, we still want the DamagePtr to be registered upfront
> on RealizeWindowProc before a corresponding xwl_window might be
> created. Most notably, it cannot be lazily created on
> SetWindowPixmapProc as damage accounting gets broken. The downside
> of this is that we may create no-op DamagePtrs for windows that are
> not redirected eventually.
I don't think this downside ever happens. For rootless mode we only
create the xwl_window for windows that are already RedirectDrawManual,
and the changes you're making to xwl_realize_window are well after that
check.
>
> @@ -552,18 +597,9 @@ xwl_realize_window(WindowPtr window)
>
> wl_surface_set_user_data(xwl_window->surface, xwl_window);
>
> - xwl_window->damage =
> - DamageCreate(damage_report, damage_destroy, DamageReportNonEmpty,
> - FALSE, screen, xwl_window);
> - if (xwl_window->damage == NULL) {
> - ErrorF("Failed creating damage\n");
> - goto err_surf;
> - }
> -
> compRedirectWindow(serverClient, window, CompositeRedirectManual);
>
> - DamageRegister(&window->drawable, xwl_window->damage);
> - DamageSetReportAfterOp(xwl_window->damage, TRUE);
> + register_damage(window);
register_damage() can fail, you've thrown away the error checking here.
- ajax
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic