New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an API to get the EGL platform identifier #39

Merged
merged 1 commit into from Nov 30, 2018

Conversation

4 participants
@hwti
Copy link
Contributor

hwti commented Nov 27, 2018

wpe_renderer_backend_egl_get_display_platform will return either :

  • a platform to give to eglGetPlatformDisplay / eglGetPlatformDisplayEXT
  • 0 (default if get_display_platform isn't implemented) if we must only use eglGetDisplay

This is needed on new Broadcom STB reference software, where both both client (wayland-egl)
and server (nexus) platforms are in the same library.

@aperezdc aperezdc requested a review from zdobersek Nov 28, 2018

Show resolved Hide resolved include/wpe/renderer-backend-egl.h Outdated

@hwti hwti force-pushed the hwti:egl_platform_identifier branch from 2ae1fee to 584cfd9 Nov 28, 2018

@aperezdc aperezdc requested review from zdobersek and carlosgcampos Nov 29, 2018

@@ -101,6 +101,10 @@ WPE_EXPORT
EGLNativeDisplayType
wpe_renderer_backend_egl_get_native_display(struct wpe_renderer_backend_egl*);

WPE_EXPORT
uint32_t
wpe_renderer_backend_egl_get_display_platform(struct wpe_renderer_backend_egl*);

This comment has been minimized.

@carlosgcampos

carlosgcampos Nov 29, 2018

Contributor

I would remove the display from the name just get_platform or even get_native_platform for consistency with get_native_display.

This comment has been minimized.

@hwti

hwti Nov 29, 2018

Contributor

eglGetPlatformDisplay parameters are named platform, and native_display, so get_platform would make sense, but I wanted to make more obvious that it would be used to create the display.

This comment has been minimized.

@carlosgcampos

carlosgcampos Nov 29, 2018

Contributor

Right, and the documentation says:

platform
Specifies the native platform to obtain a display for.

native_display
Specifies the native display to connect to.

I think it's better to be consistent with other libwpe functions rather than egl API.

This comment has been minimized.

@carlosgcampos

carlosgcampos Nov 29, 2018

Contributor

Anyway, it was just a suggestion, I'm not opposed to get_display_platform

This comment has been minimized.

@hwti

hwti Nov 29, 2018

Contributor

OK, I changed to get_platform.

Add an API to get the EGL platform identifier
wpe_renderer_backend_egl_get_platform will return either :
- a platform to give to eglGetPlatformDisplay / eglGetPlatformDisplayEXT
- 0 (default if get_platform isn't implemented) if we must only use eglGetDisplay

This is needed on new Broadcom STB reference software, where both both client (wayland-egl)
and server (nexus) platforms are in the same library.

@hwti hwti force-pushed the hwti:egl_platform_identifier branch from 584cfd9 to 0473518 Nov 29, 2018

@aperezdc aperezdc added this to the Version 1.0.1 milestone Nov 30, 2018

@zdobersek zdobersek merged commit c653d4e into WebPlatformForEmbedded:master Nov 30, 2018

@hwti hwti deleted the hwti:egl_platform_identifier branch Nov 30, 2018

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