Bug 136213 - [GTK] Add WaylandEventSource
Summary: [GTK] Add WaylandEventSource
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks: 115803
  Show dependency treegraph
 
Reported: 2014-08-25 02:58 PDT by Zan Dobersek
Modified: 2014-08-28 13:20 PDT (History)
6 users (show)

See Also:


Attachments
Patch (7.38 KB, patch)
2014-08-25 03:12 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (7.90 KB, patch)
2014-08-25 12:49 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (8.22 KB, patch)
2014-08-28 00:32 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (8.29 KB, patch)
2014-08-28 00:52 PDT, Zan Dobersek
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2014-08-25 02:58:21 PDT
[GTK] Add WaylandEventSource
Comment 1 Zan Dobersek 2014-08-25 03:12:10 PDT
Created attachment 237070 [details]
Patch
Comment 2 Zan Dobersek 2014-08-25 12:49:13 PDT
Created attachment 237100 [details]
Patch
Comment 3 Martin Robinson 2014-08-26 10:55:38 PDT
Comment on attachment 237100 [details]
Patch

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

I think you should consider a design where the callbacks are just stubs that call methods on GlibSource. I think that's a common pattern we use for these callback structs in WebKit2.

> Source/WebCore/platform/graphics/wayland/WaylandEventSource.h:45
> +    struct GLibSource {
> +        GSource source;
> +        GPollFD pfd;
> +        struct wl_display* display;
> +    };

Does this need to be exposed in the class definition?
Comment 4 Zan Dobersek 2014-08-28 00:32:34 PDT
Created attachment 237297 [details]
Patch

Uses non-lambda callbacks that relay the task to the GLibSource object.
Comment 5 Zan Dobersek 2014-08-28 00:52:58 PDT
Created attachment 237298 [details]
Patch
Comment 6 Martin Robinson 2014-08-28 10:15:37 PDT
Comment on attachment 237297 [details]
Patch

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

> Source/WebCore/platform/graphics/wayland/WaylandEventSource.cpp:42
> +    GPollFD m_pfd;

m_pfd is hard to understand without seeing the definition here. Perhaps m_pollFileDescriptor would be better?

> Source/WebCore/platform/graphics/wayland/WaylandEventSource.cpp:67
> +

Extra line here.
Comment 7 Martin Robinson 2014-08-28 10:16:14 PDT
Comment on attachment 237298 [details]
Patch

Looks great! Thanks for updating it. Please fix the small nits before landing.
Comment 8 Zan Dobersek 2014-08-28 13:20:33 PDT
Committed r173068: <http://trac.webkit.org/changeset/173068>