File: EGL_ANDROID_get_native_client_buffer.txt

package info (click to toggle)
android-platform-frameworks-native 1%3A10.0.0%2Br36-1.2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 25,836 kB
  • sloc: cpp: 252,025; xml: 52,812; ansic: 26,775; java: 5,107; python: 1,887; sh: 266; asm: 105; makefile: 23
file content (102 lines) | stat: -rw-r--r-- 2,655 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Name

    ANDROID_get_native_client_buffer

Name Strings

    EGL_ANDROID_get_native_client_buffer

Contributors

    Craig Donner

Contact

    Craig Donner, Google Inc. (cdonner 'at' google.com)

Status

    Complete

Version

    Version 3, October 11, 2017

Number

    EGL Extension #123

Dependencies

    Requires EGL 1.2.

    EGL_ANDROID_image_native_buffer and EGL_KHR_image_base are required.

    This extension is written against the wording of the EGL 1.2
    Specification as modified by EGL_KHR_image_base and
    EGL_ANDROID_image_native_buffer.

Overview

    This extension allows creating an EGLClientBuffer from an Android
    AHardwareBuffer object which can be later used to create an EGLImage.

New Types

    struct AHardwareBuffer

New Procedures and Functions

    EGLClientBuffer eglGetNativeClientBufferANDROID(const struct AHardwareBuffer *buffer)

New Tokens

    None

Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors)

    Add the following to section 2.5.1 "EGLImage Specification" (as modified by
    the EGL_KHR_image_base and EGL_ANDROID_image_native_buffer specifications),
    below the description of eglCreateImageKHR:

   "The command

        EGLClientBuffer eglGetNativeClientBufferANDROID(
                                const struct AHardwareBuffer *buffer)

    may be used to create an EGLClientBuffer from an AHardwareBuffer object.
    EGL implementations must guarantee that the lifetime of the returned
    EGLClientBuffer is at least as long as the EGLImage(s) it is bound to,
    following the lifetime semantics described below in section 2.5.2; the
    EGLClientBuffer must be destroyed no earlier than when all of its associated
    EGLImages are destroyed by eglDestroyImageKHR.

    Errors

        If eglGetNativeClientBufferANDROID fails, NULL will be returned, no
        memory will be allocated, and the following error will be generated:

       * If the value of buffer is NULL, the error EGL_BAD_PARAMETER is
         generated.

Issues

    1. Should this extension define what particular AHardwareBuffer formats EGL
    implementations are required to support?

    RESOLVED: No.

    The set of valid formats is implementation-specific and may depend on
    additional EGL extensions. The particular valid combinations for a given
    Android version and implementation should be documented by that version.

Revision History

#3 (Jesse Hall, October 11, 2017)
    - Assigned extension number, fixed minor issues for publication

#2 (Craig Donner, February 17, 2017)
    - Fix typographical errors.

#1 (Craig Donner, January 27, 2017)
    - Initial draft.