102f4aeb0Sopenharmony_ciName
202f4aeb0Sopenharmony_ci
302f4aeb0Sopenharmony_ci    NV_stream_consumer_eglimage
402f4aeb0Sopenharmony_ci
502f4aeb0Sopenharmony_ciName Strings
602f4aeb0Sopenharmony_ci
702f4aeb0Sopenharmony_ci    EGL_NV_stream_consumer_eglimage
802f4aeb0Sopenharmony_ci
902f4aeb0Sopenharmony_ciContributors
1002f4aeb0Sopenharmony_ci
1102f4aeb0Sopenharmony_ci    Mukund Keshava
1202f4aeb0Sopenharmony_ci    James Jones
1302f4aeb0Sopenharmony_ci    Daniel Kartch
1402f4aeb0Sopenharmony_ci    Sandeep Shinde
1502f4aeb0Sopenharmony_ci    Pyarelal Knowles
1602f4aeb0Sopenharmony_ci    Leo Xu
1702f4aeb0Sopenharmony_ci
1802f4aeb0Sopenharmony_ciContacts
1902f4aeb0Sopenharmony_ci
2002f4aeb0Sopenharmony_ci    Mukund Keshava, NVIDIA (mkeshava 'at' nvidia.com)
2102f4aeb0Sopenharmony_ci
2202f4aeb0Sopenharmony_ciStatus
2302f4aeb0Sopenharmony_ci
2402f4aeb0Sopenharmony_ci    Draft
2502f4aeb0Sopenharmony_ci
2602f4aeb0Sopenharmony_ciVersion
2702f4aeb0Sopenharmony_ci
2802f4aeb0Sopenharmony_ci    Version 3 - November 27, 2019
2902f4aeb0Sopenharmony_ci
3002f4aeb0Sopenharmony_ciNumber
3102f4aeb0Sopenharmony_ci
3202f4aeb0Sopenharmony_ci    EGL Extension #139
3302f4aeb0Sopenharmony_ci
3402f4aeb0Sopenharmony_ciExtension Type
3502f4aeb0Sopenharmony_ci
3602f4aeb0Sopenharmony_ci    EGL display extension
3702f4aeb0Sopenharmony_ci
3802f4aeb0Sopenharmony_ciDependencies
3902f4aeb0Sopenharmony_ci
4002f4aeb0Sopenharmony_ci    Requires the EGL_KHR_stream extension.
4102f4aeb0Sopenharmony_ci
4202f4aeb0Sopenharmony_ci    Requires the EGL_KHR_reusable_sync extension.
4302f4aeb0Sopenharmony_ci
4402f4aeb0Sopenharmony_ci    This extension is written against the wording of the EGL 1.5
4502f4aeb0Sopenharmony_ci    Specification
4602f4aeb0Sopenharmony_ci
4702f4aeb0Sopenharmony_ciOverview
4802f4aeb0Sopenharmony_ci
4902f4aeb0Sopenharmony_ci    An EGLStream consists of a sequence of image frames. This extension
5002f4aeb0Sopenharmony_ci    allows these frames to be acquired as EGLImages. Frames from the
5102f4aeb0Sopenharmony_ci    stream would be used as the content for the EGLImage.
5202f4aeb0Sopenharmony_ci
5302f4aeb0Sopenharmony_ciNew Procedures and Functions
5402f4aeb0Sopenharmony_ci
5502f4aeb0Sopenharmony_ci    EGLBoolean eglStreamImageConsumerConnectNV(
5602f4aeb0Sopenharmony_ci                    EGLDisplay dpy,
5702f4aeb0Sopenharmony_ci                    EGLStreamKHR stream,
5802f4aeb0Sopenharmony_ci                    EGLint num_modifiers,
5902f4aeb0Sopenharmony_ci                    EGLuint64KHR *modifiers,
6002f4aeb0Sopenharmony_ci                    EGLAttrib* attrib_list);
6102f4aeb0Sopenharmony_ci
6202f4aeb0Sopenharmony_ci    EGLint eglQueryStreamConsumerEventNV(
6302f4aeb0Sopenharmony_ci                    EGLDisplay dpy,
6402f4aeb0Sopenharmony_ci                    EGLStreamKHR stream,
6502f4aeb0Sopenharmony_ci                    EGLTime timeout,
6602f4aeb0Sopenharmony_ci                    EGLenum *event,
6702f4aeb0Sopenharmony_ci                    EGLAttrib *aux);
6802f4aeb0Sopenharmony_ci
6902f4aeb0Sopenharmony_ci    EGLBoolean eglStreamAcquireImageNV(
7002f4aeb0Sopenharmony_ci                    EGLDisplay dpy,
7102f4aeb0Sopenharmony_ci                    EGLStreamKHR stream,
7202f4aeb0Sopenharmony_ci                    EGLImage *pImage,
7302f4aeb0Sopenharmony_ci                    EGLSync  sync);
7402f4aeb0Sopenharmony_ci
7502f4aeb0Sopenharmony_ci    EGLBoolean eglStreamReleaseImageNV(
7602f4aeb0Sopenharmony_ci                    EGLDisplay dpy,
7702f4aeb0Sopenharmony_ci                    EGLStreamKHR stream,
7802f4aeb0Sopenharmony_ci                    EGLImage image,
7902f4aeb0Sopenharmony_ci                    EGLSync sync);
8002f4aeb0Sopenharmony_ci
8102f4aeb0Sopenharmony_ciNew Tokens
8202f4aeb0Sopenharmony_ci
8302f4aeb0Sopenharmony_ci    Accepted by the <target> parameter of eglCreateImage:
8402f4aeb0Sopenharmony_ci
8502f4aeb0Sopenharmony_ci        EGL_STREAM_CONSUMER_IMAGE_NV            0x3373
8602f4aeb0Sopenharmony_ci
8702f4aeb0Sopenharmony_ci    Returned as an <event> from eglQueryStreamConsumerEventNV:
8802f4aeb0Sopenharmony_ci
8902f4aeb0Sopenharmony_ci        EGL_STREAM_IMAGE_ADD_NV                 0x3374
9002f4aeb0Sopenharmony_ci        EGL_STREAM_IMAGE_REMOVE_NV              0x3375
9102f4aeb0Sopenharmony_ci        EGL_STREAM_IMAGE_AVAILABLE_NV           0x3376
9202f4aeb0Sopenharmony_ci
9302f4aeb0Sopenharmony_ciAdd to section "3.9 EGLImage Specification and Management" of
9402f4aeb0Sopenharmony_cithe EGL 1.5 Specification, in the description of eglCreateImage:
9502f4aeb0Sopenharmony_ci
9602f4aeb0Sopenharmony_ci   "Values accepted for <target> are listed in Table 3.10, below.
9702f4aeb0Sopenharmony_ci
9802f4aeb0Sopenharmony_ci     +-------------------------------+-----------------------------------+
9902f4aeb0Sopenharmony_ci     |  <target>                     |  Notes                            |
10002f4aeb0Sopenharmony_ci     +-------------------------------+-----------------------------------+
10102f4aeb0Sopenharmony_ci     |  EGL_STREAM_CONSUMER_IMAGE_NV |  Used with EGLStream objects      |
10202f4aeb0Sopenharmony_ci     +-------------------------------+-----------------------------------+
10302f4aeb0Sopenharmony_ci      Table 3.10: Legal values for eglCreateImage target parameter.
10402f4aeb0Sopenharmony_ci
10502f4aeb0Sopenharmony_ci    If <target> is EGL_STREAM_CONSUMER_IMAGE_NV, a new EGLImage will be
10602f4aeb0Sopenharmony_ci    created for the next consumer image frame in the EGLStream
10702f4aeb0Sopenharmony_ci    referenced by <buffer> which is not currently bound to an EGLImage.
10802f4aeb0Sopenharmony_ci    If the stream's producer reuses memory buffers for multiple image
10902f4aeb0Sopenharmony_ci    frames, then an EGLImage obtained in this way will persist for the
11002f4aeb0Sopenharmony_ci    next image frame that uses the same buffer, unless destroyed in
11102f4aeb0Sopenharmony_ci    the interim. Otherwise, the user must create a new EGLImage for
11202f4aeb0Sopenharmony_ci    every frame. Creating the EGLImage does not guarantee that the
11302f4aeb0Sopenharmony_ci    image contents will be ready for use. The EGLImage must first be
11402f4aeb0Sopenharmony_ci    acquired from the stream after creation.
11502f4aeb0Sopenharmony_ci
11602f4aeb0Sopenharmony_ci    If the EGLImage created for a consumer image frame is destroyed via
11702f4aeb0Sopenharmony_ci    eglDestroyImage, a new EGLImage needs to be created via
11802f4aeb0Sopenharmony_ci    eglCreateImage for the same consumer image frame.
11902f4aeb0Sopenharmony_ci
12002f4aeb0Sopenharmony_ci    <dpy> must be a valid initialized display. <ctx> must be
12102f4aeb0Sopenharmony_ci    EGL_NO_CONTEXT. <buffer> must be a handle to a valid EGLStream
12202f4aeb0Sopenharmony_ci    object, cast into the type EGLClientBuffer.
12302f4aeb0Sopenharmony_ci
12402f4aeb0Sopenharmony_ci    Add to the list of error conditions for eglCreateImage:
12502f4aeb0Sopenharmony_ci
12602f4aeb0Sopenharmony_ci      "* If <target> is EGL_STREAM_CONSUMER_IMAGE_NV and <buffer> is
12702f4aeb0Sopenharmony_ci         not a valid stream handle associated with <dpy>, the error
12802f4aeb0Sopenharmony_ci         EGL_BAD_STREAM_KHR is generated.
12902f4aeb0Sopenharmony_ci
13002f4aeb0Sopenharmony_ci       * If <target> is EGL_STREAM_CONSUMER_IMAGE_NV, and <ctx> is not
13102f4aeb0Sopenharmony_ci         EGL_NO_CONTEXT, the error EGL_BAD_PARAMETER is generated.
13202f4aeb0Sopenharmony_ci
13302f4aeb0Sopenharmony_ci       * If <target> is EGL_STREAM_CONSUMER_IMAGE_NV, and there are no
13402f4aeb0Sopenharmony_ci         buffers in the <stream> currently or if there are no buffers
13502f4aeb0Sopenharmony_ci         associated with the stream that are not already bound to
13602f4aeb0Sopenharmony_ci         EGLImages EGL_BAD_ACCESS is generated.
13702f4aeb0Sopenharmony_ci
13802f4aeb0Sopenharmony_ci    eglCreateImage needs to be called with EGL_STREAM_CONSUMER_IMAGE_NV
13902f4aeb0Sopenharmony_ci    as the <target> for every valid buffer in the EGLStream.
14002f4aeb0Sopenharmony_ci
14102f4aeb0Sopenharmony_ciAdd section "3.10.2 Connecting an EGLStream to a consumer" in the
14202f4aeb0Sopenharmony_ciEGL_KHR_stream extension with this:
14302f4aeb0Sopenharmony_ci
14402f4aeb0Sopenharmony_ci    3.10.2.2 EGLImage consumer
14502f4aeb0Sopenharmony_ci
14602f4aeb0Sopenharmony_ci    Call
14702f4aeb0Sopenharmony_ci
14802f4aeb0Sopenharmony_ci        EGLBoolean eglStreamImageConsumerConnectNV(
14902f4aeb0Sopenharmony_ci                    EGLDisplay dpy,
15002f4aeb0Sopenharmony_ci                    EGLStreamKHR stream,
15102f4aeb0Sopenharmony_ci                    EGLint num_modifiers,
15202f4aeb0Sopenharmony_ci                    EGLuint64KHR *modifiers,
15302f4aeb0Sopenharmony_ci                    EGLAttrib* attrib_list);
15402f4aeb0Sopenharmony_ci
15502f4aeb0Sopenharmony_ci    to connect the EGLImage consumer to the <stream>. An EGLImage
15602f4aeb0Sopenharmony_ci    consumer allows image frames inserted in the stream to be received
15702f4aeb0Sopenharmony_ci    as EGLImages, which can then be bound to any other object which
15802f4aeb0Sopenharmony_ci    supports EGLImage. For each image frame, an EGLImage must first be
15902f4aeb0Sopenharmony_ci    created as described in section "3.9 EGLImage Specification and
16002f4aeb0Sopenharmony_ci    Management" of the EGL 1.5 Specification, and then the frame
16102f4aeb0Sopenharmony_ci    contents must be latched to the EGLImage as described below.
16202f4aeb0Sopenharmony_ci
16302f4aeb0Sopenharmony_ci    In <modifiers> the consumer can advertise an optional list of
16402f4aeb0Sopenharmony_ci    supported DRM modifiers as described in
16502f4aeb0Sopenharmony_ci    EXT_image_dma_buf_import_modifiers. This information could be
16602f4aeb0Sopenharmony_ci    used by the producer to generate consumer supported image frames.
16702f4aeb0Sopenharmony_ci
16802f4aeb0Sopenharmony_ci    If not NULL, <attrib_list> points to an array of name/value
16902f4aeb0Sopenharmony_ci    pairs, terminated by EGL_NONE. Currently no attributes are
17002f4aeb0Sopenharmony_ci    supported.
17102f4aeb0Sopenharmony_ci
17202f4aeb0Sopenharmony_ci    On success, EGL_TRUE is returned.
17302f4aeb0Sopenharmony_ci
17402f4aeb0Sopenharmony_ci        - <stream> state is set to EGL_STREAM_STATE_CONNECTING_KHR
17502f4aeb0Sopenharmony_ci          allowing the producer to be connected.
17602f4aeb0Sopenharmony_ci
17702f4aeb0Sopenharmony_ci    On failure, EGL_FALSE is returned and an error is generated.
17802f4aeb0Sopenharmony_ci
17902f4aeb0Sopenharmony_ci        - EGL_BAD_DISPLAY is generated if <dpy> is not the handle of a
18002f4aeb0Sopenharmony_ci          valid EGLDisplay object.
18102f4aeb0Sopenharmony_ci
18202f4aeb0Sopenharmony_ci        - EGL_BAD_STREAM_KHR is generated if <stream> is not a valid
18302f4aeb0Sopenharmony_ci          valid stream handle associated with <dpy>.
18402f4aeb0Sopenharmony_ci
18502f4aeb0Sopenharmony_ci        - EGL_BAD_STATE_KHR is generated if the <stream> state is not
18602f4aeb0Sopenharmony_ci          EGL_STREAM_STATE_CREATED_KHR before
18702f4aeb0Sopenharmony_ci          eglStreamImageConsumerConnectNV is called.
18802f4aeb0Sopenharmony_ci
18902f4aeb0Sopenharmony_ci    Call
19002f4aeb0Sopenharmony_ci
19102f4aeb0Sopenharmony_ci        EGLint eglQueryStreamConsumerEventNV(
19202f4aeb0Sopenharmony_ci                    EGLDisplay dpy,
19302f4aeb0Sopenharmony_ci                    EGLStreamKHR stream,
19402f4aeb0Sopenharmony_ci                    EGLTime timeout,
19502f4aeb0Sopenharmony_ci                    EGLenum *event,
19602f4aeb0Sopenharmony_ci                    EGLAttrib *aux);
19702f4aeb0Sopenharmony_ci
19802f4aeb0Sopenharmony_ci    to query the <stream> for the next pending event.
19902f4aeb0Sopenharmony_ci    eglQueryStreamConsumerEventNV returns in <event> the event type
20002f4aeb0Sopenharmony_ci    and returns in <aux> additional data associated with some events.
20102f4aeb0Sopenharmony_ci
20202f4aeb0Sopenharmony_ci    If no event is pending at the time eglQueryStreamConsumerEventNV is
20302f4aeb0Sopenharmony_ci    called, it will wait up to <timeout> nanoseconds for one to arrive
20402f4aeb0Sopenharmony_ci    before returning. If <timeout> is EGL_FOREVER, the function will
20502f4aeb0Sopenharmony_ci    not time out and will only return if an event arrives or the stream
20602f4aeb0Sopenharmony_ci    becomes disconnected.
20702f4aeb0Sopenharmony_ci
20802f4aeb0Sopenharmony_ci    On success, EGL_TRUE is returned. A new event will be returned.
20902f4aeb0Sopenharmony_ci    The valid events are as follows:
21002f4aeb0Sopenharmony_ci
21102f4aeb0Sopenharmony_ci        - EGL_STREAM_IMAGE_ADD_NV is returned if a buffer is present in
21202f4aeb0Sopenharmony_ci          the stream which has not yet been bound to an EGLImage with
21302f4aeb0Sopenharmony_ci          eglCreateImage.
21402f4aeb0Sopenharmony_ci
21502f4aeb0Sopenharmony_ci        - EGL_STREAM_IMAGE_REMOVE_NV indicates that a buffer has been
21602f4aeb0Sopenharmony_ci          removed from the stream and its EGLImage, whose handle is
21702f4aeb0Sopenharmony_ci          returned in <aux>, can be destroyed when the consumer
21802f4aeb0Sopenharmony_ci          application no longer requires it.
21902f4aeb0Sopenharmony_ci
22002f4aeb0Sopenharmony_ci        - EGL_STREAM_IMAGE_AVAILABLE_NV indicates that there is a
22102f4aeb0Sopenharmony_ci          new frame available in the stream that can be acquired via
22202f4aeb0Sopenharmony_ci          eglStreamAcquireImageNV.
22302f4aeb0Sopenharmony_ci
22402f4aeb0Sopenharmony_ci    On failure, EGL_FALSE is returned and an error is generated and
22502f4aeb0Sopenharmony_ci    <event> and <aux> are not modified.
22602f4aeb0Sopenharmony_ci
22702f4aeb0Sopenharmony_ci        - EGL_BAD_STREAM_KHR is generated if <stream> is not a valid
22802f4aeb0Sopenharmony_ci          valid stream handle associated with <dpy>.
22902f4aeb0Sopenharmony_ci
23002f4aeb0Sopenharmony_ci    EGL_TIMEOUT_EXPIRED is returned if the <timeout> duration is
23102f4aeb0Sopenharmony_ci    complete, and there are no valid events that occured in this
23202f4aeb0Sopenharmony_ci    duration. The <event> and <aux> parameters are not modified.
23302f4aeb0Sopenharmony_ci
23402f4aeb0Sopenharmony_ci    Call
23502f4aeb0Sopenharmony_ci
23602f4aeb0Sopenharmony_ci        EGLBoolean eglStreamAcquireImageNV(
23702f4aeb0Sopenharmony_ci                    EGLDisplay dpy,
23802f4aeb0Sopenharmony_ci                    EGLStreamKHR stream,
23902f4aeb0Sopenharmony_ci                    EGLImage *pImage,
24002f4aeb0Sopenharmony_ci                    EGLSync sync);
24102f4aeb0Sopenharmony_ci
24202f4aeb0Sopenharmony_ci    to "latch" the next image frame in the image stream from <stream>
24302f4aeb0Sopenharmony_ci    into an EGLImage.
24402f4aeb0Sopenharmony_ci
24502f4aeb0Sopenharmony_ci    The consumer application needs to create a reusable EGLSync object
24602f4aeb0Sopenharmony_ci    using eglCreateSync with EGL_SYNC_STATUS set to EGL_SIGNALED prior
24702f4aeb0Sopenharmony_ci    to to this command.
24802f4aeb0Sopenharmony_ci
24902f4aeb0Sopenharmony_ci    eglStreamAcquireImageNV accepts a handle to a previously created
25002f4aeb0Sopenharmony_ci    <sync> object. eglStreamAcquireImageNV will write into the
25102f4aeb0Sopenharmony_ci    <sync> object and this indicates when the producer will be done
25202f4aeb0Sopenharmony_ci    writing to the frame. It also resets the state of the <sync> object
25302f4aeb0Sopenharmony_ci    to unsignaled.
25402f4aeb0Sopenharmony_ci
25502f4aeb0Sopenharmony_ci    If <sync> is EGL_NO_SYNC, the consumer ignores the sync object.
25602f4aeb0Sopenharmony_ci
25702f4aeb0Sopenharmony_ci    On success, EGL_TRUE is returned.
25802f4aeb0Sopenharmony_ci
25902f4aeb0Sopenharmony_ci        - <pImage> will have the most recent frame from the <stream>
26002f4aeb0Sopenharmony_ci
26102f4aeb0Sopenharmony_ci    On failure, eglStreamAcquireImageNV returns EGL_FALSE, and an error
26202f4aeb0Sopenharmony_ci    is generated.
26302f4aeb0Sopenharmony_ci
26402f4aeb0Sopenharmony_ci        - EGL_BAD_DISPLAY is generated if <dpy> is not a valid,
26502f4aeb0Sopenharmony_ci          initialized EGLDisplay.
26602f4aeb0Sopenharmony_ci
26702f4aeb0Sopenharmony_ci        - EGL_BAD_STREAM_KHR is generated if <stream> is not a valid
26802f4aeb0Sopenharmony_ci          valid stream handle associated with <dpy>.
26902f4aeb0Sopenharmony_ci
27002f4aeb0Sopenharmony_ci        - EGL_BAD_ACCESS is generated if there are no frames in the
27102f4aeb0Sopenharmony_ci          <stream> that are available to acquire.
27202f4aeb0Sopenharmony_ci
27302f4aeb0Sopenharmony_ci    Call
27402f4aeb0Sopenharmony_ci
27502f4aeb0Sopenharmony_ci        EGLBoolean eglStreamReleaseImageNV(
27602f4aeb0Sopenharmony_ci                    EGLDisplay dpy,
27702f4aeb0Sopenharmony_ci                    EGLStreamKHR stream,
27802f4aeb0Sopenharmony_ci                    EGLImage image,
27902f4aeb0Sopenharmony_ci                    EGLSync sync);
28002f4aeb0Sopenharmony_ci
28102f4aeb0Sopenharmony_ci    to release the <image> frame back to the stream. This takes a
28202f4aeb0Sopenharmony_ci    <sync> that indicates when the consumer will be done using the
28302f4aeb0Sopenharmony_ci    frame. Before calling eglStreamReleaseImageNV, the <image>
28402f4aeb0Sopenharmony_ci    needs to have previously been acquired with
28502f4aeb0Sopenharmony_ci    eglStreamAcquireImageNV.
28602f4aeb0Sopenharmony_ci
28702f4aeb0Sopenharmony_ci    If <sync> is EGL_NO_SYNC, then the sync object is ignored.
28802f4aeb0Sopenharmony_ci    The eglStreamReleaseImageNV call makes a copy of the <sync>, so the
28902f4aeb0Sopenharmony_ci    caller is free to delete or reuse the <sync> as it chooses.
29002f4aeb0Sopenharmony_ci
29102f4aeb0Sopenharmony_ci    On success, EGL_TRUE is returned, and the frame is successfully
29202f4aeb0Sopenharmony_ci    returned back to the stream.
29302f4aeb0Sopenharmony_ci
29402f4aeb0Sopenharmony_ci    On failure, eglStreamReleaseImageNV returns EGL_FALSE, and an
29502f4aeb0Sopenharmony_ci    error is generated.
29602f4aeb0Sopenharmony_ci
29702f4aeb0Sopenharmony_ci        - EGL_BAD_DISPLAY is generated if <dpy> is not a valid,
29802f4aeb0Sopenharmony_ci          initialized EGLDisplay.
29902f4aeb0Sopenharmony_ci
30002f4aeb0Sopenharmony_ci        - EGL_BAD_STATE_KHR is generated if <stream> is not in state
30102f4aeb0Sopenharmony_ci          EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR or
30202f4aeb0Sopenharmony_ci          EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR.
30302f4aeb0Sopenharmony_ci
30402f4aeb0Sopenharmony_ci        - EGL_BAD_STREAM_KHR is generated if <stream> is not a valid
30502f4aeb0Sopenharmony_ci          EGLStream created for <dpy>.
30602f4aeb0Sopenharmony_ci
30702f4aeb0Sopenharmony_ci        - EGL_BAD_PARAMETER  is generated if <image> is either invalid,
30802f4aeb0Sopenharmony_ci          or is not held by the consumer.
30902f4aeb0Sopenharmony_ci
31002f4aeb0Sopenharmony_ci        - EGL_BAD_PARAMETER  is generated if <sync> is not a valid
31102f4aeb0Sopenharmony_ci          EGLSync object or EGL_NO_SYNC.
31202f4aeb0Sopenharmony_ci
31302f4aeb0Sopenharmony_ci    If an acquired EGLImage has not yet released when eglDestroyImage
31402f4aeb0Sopenharmony_ci    is called, then, then an implicit eglStreamReleaseImageNV will be
31502f4aeb0Sopenharmony_ci    called.
31602f4aeb0Sopenharmony_ci
31702f4aeb0Sopenharmony_ciAdd a new subsection 3.10.4.3.1 at the end of section "3.10.4.3
31802f4aeb0Sopenharmony_ciEGL_STREAM_STATE_KHR Attribute" in the EGL_KHR_stream extension spec:
31902f4aeb0Sopenharmony_ci
32002f4aeb0Sopenharmony_ci    3.10.4.3.1 Interaction with EGL_STREAM_STATE_KHR
32102f4aeb0Sopenharmony_ci
32202f4aeb0Sopenharmony_ci    Image frames that have been presented to the stream on the producer
32302f4aeb0Sopenharmony_ci    side, but have not been bound to an EGLImage on the consumer side
32402f4aeb0Sopenharmony_ci    yet, do not affect the EGLStream state.
32502f4aeb0Sopenharmony_ci
32602f4aeb0Sopenharmony_ci    If a new frame is presented to the stream, the stream state goes
32702f4aeb0Sopenharmony_ci    into EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR only if this frame is
32802f4aeb0Sopenharmony_ci    bound to an EGLImage on the consumer, and if it has not already
32902f4aeb0Sopenharmony_ci    been acquired.
33002f4aeb0Sopenharmony_ci
33102f4aeb0Sopenharmony_ci    If an EGLImage bound on the consumer side has been destroyed via
33202f4aeb0Sopenharmony_ci    eglDestroyImage, then the stream goes into
33302f4aeb0Sopenharmony_ci    EGL_STREAM_STATE_EMPTY_KHR if there are no consumer frames left,
33402f4aeb0Sopenharmony_ci    that are bound to an EGLImage.
33502f4aeb0Sopenharmony_ci
33602f4aeb0Sopenharmony_ciIssues
33702f4aeb0Sopenharmony_ci
33802f4aeb0Sopenharmony_ci
33902f4aeb0Sopenharmony_ciRevision History
34002f4aeb0Sopenharmony_ci
34102f4aeb0Sopenharmony_ci    #3  (November 27, 2019) Mukund Keshava
34202f4aeb0Sopenharmony_ci        - Refined some subsections with more details
34302f4aeb0Sopenharmony_ci
34402f4aeb0Sopenharmony_ci    #2  (November 22, 2019) Mukund Keshava
34502f4aeb0Sopenharmony_ci        - Refined some subsections with more details
34602f4aeb0Sopenharmony_ci        - Added new subsection 3.10.4.3.1
34702f4aeb0Sopenharmony_ci
34802f4aeb0Sopenharmony_ci    #1  (November 13, 2019) Mukund Keshava
34902f4aeb0Sopenharmony_ci        - initial draft
350