| Summary: | [GTK] Add WaylandEventSource | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Zan Dobersek <zan> | ||||||||||
| Component: | New Bugs | Assignee: | Zan Dobersek <zan> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | bunhere, commit-queue, gyuyoung.kim, mrobinson, rakuco, sergio | ||||||||||
| Priority: | P2 | ||||||||||||
| Version: | 528+ (Nightly build) | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 115803 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Zan Dobersek
2014-08-25 02:58:21 PDT
Created attachment 237070 [details]
Patch
Created attachment 237100 [details]
Patch
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? Created attachment 237297 [details]
Patch
Uses non-lambda callbacks that relay the task to the GLibSource object.
Created attachment 237298 [details]
Patch
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 on attachment 237298 [details]
Patch
Looks great! Thanks for updating it. Please fix the small nits before landing.
Committed r173068: <http://trac.webkit.org/changeset/173068> |