Skip to content

Windowless - #40

Closed
psivasubramanian wants to merge 39 commits into
WebPlatformForEmbedded:masterfrom
psivasubramanian:patch-3
Closed

Windowless#40
psivasubramanian wants to merge 39 commits into
WebPlatformForEmbedded:masterfrom
psivasubramanian:patch-3

Conversation

@psivasubramanian

Copy link
Copy Markdown

No description provided.

@psivasubramanianpsivasubramanian mentioned this pull request Apr 13, 2016
@philn

Copy link
Copy Markdown

What is the use-case for this?

@psivasubramanian

Copy link
Copy Markdown
Author

Windowless backend support with Keyboard and Mouse events

@zdobersek

Copy link
Copy Markdown

"Windowless" in what way?

Why enabling PLATFORM(WAYLAND) then?

What's the point of this backend?

@psivasubramanian

Copy link
Copy Markdown
Author

It's Wayland backend only and the name windowless is since webprocess itself is used for rendering.

@kraj

kraj commented Apr 16, 2016

Copy link
Copy Markdown

is windowless'ness related to compositor here since you are using wayland backend so it can be another backend I hope.

@psivasubramanian

Copy link
Copy Markdown
Author

Thanks @zdobersek for taking pain to answer. Here are some of the questions

  1. Dummy viewbackend implementation is not required? Does bypassing Viewbackend mean that?
  2. All these changes including key & mouse event support should be under Source/WPE only?

@zdobersek

Copy link
Copy Markdown
  1. ViewBackend implementation is required, but it would only ever send the frameComplete() call back to the client in the commitBuffer() function. See the IntelCE backend, but ignore the GDL initialization.
    https://github.com/Metrological/WebKitForWayland/blob/master/Source/WPE/Source/ViewBackend/IntelCE/ViewBackendIntelCE.cpp
  2. No big changes should be done outside Source/WPE, and definitely not anything under PLATFORM(WAYLAND) -- we shouldn't use that code in any configuration.

Input events are are problematic in this setup, because they must be piped to the client that ViewBackend provides in setInputClient() -- that's set in stone, and can't be changed or worked around. But the Wayland client is now running in the WebProcess so you have to somehow pipe the events back to the client that's in the UIProcess.

@psivasubramanian

Copy link
Copy Markdown
Author

@zdobersek@kraj
Here are the review changes approach to get this code merged.

  1. Modifying our current ViewBackend (Windowless implementation) commitBuffer method to actually send only the frameComplete() callback.
  2. Moving all changes (outside of Source/WPE including input event handling) to our new RenderingBackend implementation.
  3. Sending the input events from RenderingBackend to ViewBackend through IPC like
    CompositorManager (Webprocess) ---------> CompositorManagerProxy (UIProcess) and then to ViewBackend. Of course this messaging implementation(Webprocess to UIProcess) will be outside Source/WPE.
  4. Modifying ViewBackend implementation to add input events handler methods which will send those events to input client.
  5. Planning to rename this backend since current name "windowless" is confusing.
    Kindly comment on this approach steps.

@zdobersek

Copy link
Copy Markdown

1, 2, and 5 are fine. I recommend doing these first.

In the next two weeks I expect to switch over various ViewBackend and RenderingBackend implementations to the new WPE library:
https://github.com/WebKitForWayland/webkit/tree/wpe-ng
https://github.com/WebKitForWayland/webkit/tree/wpe-ng/Source/ThirdParty/WPE

This infrastructure would allow constructing additional IPC channels between the ViewBackend (in the future wpe_view_backend) and the RenderingBackend (in the future wpe_renderer_backend_egl), not being limited only to WK2 IPC. It's through these additional IPCs that buffer management will be done, and it would also be possible to communicate events from the WebProcess to the UIProcess through there.

So I'd recommend holding off 3 and 4 until that work is completed (I hope to be done in 2 weeks), after which point the event routing will be possible outside of WebKit.

@psivasubramanian

Copy link
Copy Markdown
Author

Thanks @zdobersek
We started implementing the changes mentioned in my comment namely point 1,2 & 5 first.

@psivasubramanian

Copy link
Copy Markdown
Author

@zdobersek@kraj & others
I have implemented review changes 1,2 & 5 as you suggested. Can you kindly guide on upstreaming it to the same pull request. I tried few experiments, but not able to upstream.

@psivasubramanianpsivasubramanian mentioned this pull request May 23, 2016
@psivasubramanian

Copy link
Copy Markdown
Author

Closing this as new review #57 is merged to mainstream. Thanks @zdobersek@kraj and others.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@psivasubramanian@philn@zdobersek@kraj