Bug 161904 - [GTK] Drop redundant wl_display_flush_clients() call
Summary: [GTK] Drop redundant wl_display_flush_clients() call
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-13 04:09 PDT by Emanuele Aina
Modified: 2016-10-08 16:14 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.12 KB, patch)
2016-09-13 04:11 PDT, Emanuele Aina
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuele Aina 2016-09-13 04:09:39 PDT
The Wayland GSource::prepare() function already calls wl_display_flush_clients() at every mainloop iteration, so there's no need to further call it on Surface::commit().
Comment 1 Emanuele Aina 2016-09-13 04:11:12 PDT
Created attachment 288684 [details]
Patch
Comment 2 Carlos Garcia Campos 2016-09-13 05:05:38 PDT
Comment on attachment 288684 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=288684&action=review

> Source/WebKit2/ChangeLog:10
> +        The Wayland GSource::prepare() function already calls
> +        wl_display_flush_clients() at every mainloop iteration, so there's no
> +        need to further call it on Surface::commit().

That's not equivalent, prepare is called before dispatch, and commit happens on dispatch. I'm not saying we need to flush on commit, because I don't know, I copied that from previous patches, but this explanation is not clear to me.
Comment 3 Emanuele Aina 2016-09-13 05:41:56 PDT
Yep, I didn't mean to imply that it was equivalent, just that as far as I can tell, even by asking to Wayland developer around here, there's no reason to call wl_display_flush_clients() in ::commit(), and that the call in ::prepare() is the place where they expected the call to be.

For further reference, the Wakefield experimental compositor only does it in the ::prepare() function: https://github.com/alexlarsson/wakefield/blob/master/wakefield-compositor.c#L1919

Let me know how I can make the ChangeLog entry more clear.
Comment 4 WebKit Commit Bot 2016-10-08 16:14:50 PDT
Comment on attachment 288684 [details]
Patch

Clearing flags on attachment: 288684

Committed r206961: <http://trac.webkit.org/changeset/206961>
Comment 5 WebKit Commit Bot 2016-10-08 16:14:53 PDT
All reviewed patches have been landed.  Closing bug.