• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    ANDROID_get_native_client_buffer
4
5Name Strings
6
7    EGL_ANDROID_get_native_client_buffer
8
9Contributors
10
11    Craig Donner
12
13Contact
14
15    Craig Donner, Google Inc. (cdonner 'at' google.com)
16
17Status
18
19    Complete
20
21Version
22
23    Version 3, October 11, 2017
24
25Number
26
27    EGL Extension #123
28
29Dependencies
30
31    Requires EGL 1.2.
32
33    EGL_ANDROID_image_native_buffer and EGL_KHR_image_base are required.
34
35    This extension is written against the wording of the EGL 1.2
36    Specification as modified by EGL_KHR_image_base and
37    EGL_ANDROID_image_native_buffer.
38
39Overview
40
41    This extension allows creating an EGLClientBuffer from an Android
42    AHardwareBuffer object which can be later used to create an EGLImage.
43
44New Types
45
46    struct AHardwareBuffer
47
48New Procedures and Functions
49
50    EGLClientBuffer eglGetNativeClientBufferANDROID(const struct AHardwareBuffer *buffer)
51
52New Tokens
53
54    None
55
56Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors)
57
58    Add the following to section 2.5.1 "EGLImage Specification" (as modified by
59    the EGL_KHR_image_base and EGL_ANDROID_image_native_buffer specifications),
60    below the description of eglCreateImageKHR:
61
62   "The command
63
64        EGLClientBuffer eglGetNativeClientBufferANDROID(
65                                const struct AHardwareBuffer *buffer)
66
67    may be used to create an EGLClientBuffer from an AHardwareBuffer object.
68    EGL implementations must guarantee that the lifetime of the returned
69    EGLClientBuffer is at least as long as the EGLImage(s) it is bound to,
70    following the lifetime semantics described below in section 2.5.2; the
71    EGLClientBuffer must be destroyed no earlier than when all of its associated
72    EGLImages are destroyed by eglDestroyImageKHR.
73
74    Errors
75
76        If eglGetNativeClientBufferANDROID fails, NULL will be returned, no
77        memory will be allocated, and the following error will be generated:
78
79       * If the value of buffer is NULL, the error EGL_BAD_PARAMETER is
80         generated.
81
82Issues
83
84    1. Should this extension define what particular AHardwareBuffer formats EGL
85    implementations are required to support?
86
87    RESOLVED: No.
88
89    The set of valid formats is implementation-specific and may depend on
90    additional EGL extensions. The particular valid combinations for a given
91    Android version and implementation should be documented by that version.
92
93Revision History
94
95#3 (Jesse Hall, October 11, 2017)
96    - Assigned extension number, fixed minor issues for publication
97
98#2 (Craig Donner, February 17, 2017)
99    - Fix typographical errors.
100
101#1 (Craig Donner, January 27, 2017)
102    - Initial draft.
103