EGL_ANDROID_image_native_buffer.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. Name
  2. ANDROID_image_native_buffer
  3. Name Strings
  4. EGL_ANDROID_image_native_buffer
  5. Contributors
  6. Mathias Agopian
  7. Jamie Gennis
  8. Jesse Hall
  9. Contact
  10. Jesse Hall, Google Inc. (jessehall 'at' google.com)
  11. Status
  12. Complete
  13. Version
  14. Version 1, November 28, 2012
  15. Number
  16. EGL Extension #49
  17. Dependencies
  18. EGL 1.2 is required.
  19. EGL_KHR_image_base is required.
  20. This extension is written against the wording of the EGL 1.2
  21. Specification.
  22. Overview
  23. This extension enables using an Android window buffer (struct
  24. ANativeWindowBuffer) as an EGLImage source.
  25. New Types
  26. None.
  27. New Procedures and Functions
  28. None.
  29. New Tokens
  30. Accepted by the <target> parameter of eglCreateImageKHR:
  31. EGL_NATIVE_BUFFER_ANDROID 0x3140
  32. Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors)
  33. Add to section 2.5.1 "EGLImage Specification" (as defined by the
  34. EGL_KHR_image_base specification), in the description of
  35. eglCreateImageKHR:
  36. "Values accepted for <target> are listed in Table aaa, below.
  37. +----------------------------+-----------------------------------------+
  38. | <target> | Notes |
  39. +----------------------------+-----------------------------------------+
  40. | EGL_NATIVE_BUFFER_ANDROID | Used for ANativeWindowBuffer objects |
  41. +----------------------------+-----------------------------------------+
  42. Table aaa. Legal values for eglCreateImageKHR <target> parameter
  43. ...
  44. If <target> is EGL_NATIVE_BUFFER_ANDROID, <dpy> must be a valid display,
  45. <ctx> must be EGL_NO_CONTEXT, <buffer> must be a pointer to a valid
  46. ANativeWindowBuffer object (cast into the type EGLClientBuffer), and
  47. attributes other than EGL_IMAGE_PRESERVED_KHR are ignored."
  48. Add to the list of error conditions for eglCreateImageKHR:
  49. "* If <target> is EGL_NATIVE_BUFFER_ANDROID and <buffer> is not a
  50. pointer to a valid ANativeWindowBuffer, the error EGL_BAD_PARAMETER
  51. is generated.
  52. * If <target> is EGL_NATIVE_BUFFER_ANDROID and <ctx> is not
  53. EGL_NO_CONTEXT, the error EGL_BAD_CONTEXT is generated.
  54. * If <target> is EGL_NATIVE_BUFFER_ANDROID and <buffer> was created
  55. with properties (format, usage, dimensions, etc.) not supported by
  56. the EGL implementation, the error EGL_BAD_PARAMETER is generated."
  57. Issues
  58. 1. Should this extension define what combinations of ANativeWindowBuffer
  59. properties implementations are required to support?
  60. RESOLVED: No.
  61. The requirements have evolved over time and will continue to change with
  62. future Android releases. The minimum requirements for a given Android
  63. version should be documented by that version.
  64. Revision History
  65. #1 (Jesse Hall, November 28, 2012)
  66. - Initial draft.