diff options
author | Miguel A. Vico <mvicomoya@nvidia.com> | 2016-05-02 16:34:01 +0200 |
---|---|---|
committer | Miguel A. Vico <mvicomoya@nvidia.com> | 2016-05-10 15:10:20 +0200 |
commit | 274d1bf371250c9d0a2ff5b7d5e6a1e0faafc380 (patch) | |
tree | 07c03eaca28e958bd6948bc4ede4ea6cfb415e3d /src/weston-egl-ext.h | |
parent | 4580750bf5f3b206f5ffed5cf16af69365ae2b52 (diff) |
gl-renderer: Add support for EGLDevice composited frame presentation
EGLDevice provides means to enumerate native devices, and then create
an EGL display connection from them.
Similarly, EGLOutput will provide means to access different
portions of display control hardware associated with an EGLDevice.
For instance, EGLOutputLayer represents a portion of display
control hardware that accepts an image as input and processes it
for presentation on a display device.
EGLStream implements a mechanism to communicate frame producers and
frame consumers. By attaching an EGLOutputLayer consumer to a stream,
a producer will be able to present frames on a display device.
Thus, a compositor could produce frames and feed them to an
EGLOutputLayer through an EGLStream for presentation on a display
device.
This change adds required logic to support presentation approach
described above.
Note that some unpublished EGL extensions were needed:
- EGL_NV_stream_attrib:
https://github.com/aritger/eglstreams-kms-example/blob/master/proposed-extensions/EGL_NV_stream_attrib.txt
- EGL_EXT_stream_acquire_mode:
https://github.com/aritger/eglstreams-kms-example/blob/master/proposed-extensions/EGL_EXT_stream_acquire_mode.txt
- EGL_NV_output_drm_flip_event:
https://github.com/aritger/eglstreams-kms-example/blob/master/proposed-extensions/EGL_NV_output_drm_flip_event.txt
Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Reviewed-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Adam Cheney <acheney@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
Diffstat (limited to 'src/weston-egl-ext.h')
-rw-r--r-- | src/weston-egl-ext.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/weston-egl-ext.h b/src/weston-egl-ext.h index 32f6108f..6597e114 100644 --- a/src/weston-egl-ext.h +++ b/src/weston-egl-ext.h @@ -116,5 +116,23 @@ typedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) ( #define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A #endif +/* + * FIXME: Remove both EGL_EXT_stream_acquire_mode and + * EGL_NV_output_drm_flip_event definitions below once both extensions + * get published by Khronos and incorportated into Khronos' header files + */ +#ifndef EGL_EXT_stream_acquire_mode +#define EGL_EXT_stream_acquire_mode 1 +#define EGL_CONSUMER_AUTO_ACQUIRE_EXT 0x332B +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREATTRIBEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribEXT (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); +#endif +#endif /* EGL_EXT_stream_acquire_mode */ + +#ifndef EGL_NV_output_drm_flip_event +#define EGL_NV_output_drm_flip_event 1 +#define EGL_DRM_FLIP_EVENT_DATA_NV 0x333E +#endif /* EGL_NV_output_drm_flip_event */ #endif |