xref: /aosp_15_r20/external/angle/extensions/EGL_ANGLE_surface_orientation.txt (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1Name
2
3    ANGLE_surface_orientation
4
5Name Strings
6
7    EGL_ANGLE_surface_orientation
8
9Contributors
10
11    Geoff Lang, Google
12
13Contacts
14
15    Geoff Lang, Google (geofflang 'at' google 'dot' com)
16
17Status
18
19    Draft
20
21Version
22
23    Version 1, 2015-12-15
24
25Number
26
27    EGL Extension XXX
28
29Extension Type
30
31    EGL display extension
32
33Dependencies
34
35    Written based on the wording of the EGL 1.5 Specification
36    (August 7 2014).
37
38Overview
39
40    This extension provides a mechanism for querying the most optimal
41    orientation of a window surface and creating window sufraces with
42    non-default orientations for the most performant rendering.
43
44New Types
45
46    None
47
48New Procedures and Functions
49
50    None
51
52New Tokens
53
54    New EGLConfig bitmask attribute name:
55
56        EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE 0x33A7
57
58    Accepted as an attribute name in the <attrib_list> argument of
59    eglCreateWindowSurface and attribute name in the <attribute>
60    argument of eglQuerySurface:
61
62        EGL_SURFACE_ORIENTATION_ANGLE 0x33A8
63
64    Valid bitfields in the EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE bitmask
65    attribute of EGLConfig and EGL_SURFACE_ORIENTATION_ANGLE bitmask attribute
66    of eglCreateWindowSurface:
67
68        EGL_SURFACE_ORIENTATION_INVERT_X_ANGLE 0x0001
69        EGL_SURFACE_ORIENTATION_INVERT_Y_ANGLE 0x0002
70
71Additions to the EGL Specification
72
73    Additions to Chapter 3 of the EGL 1.5 Specification (EGL Functions and Errors)
74
75    Add to table 3.1 (EGLConfig Attributes)
76
77    Attribute                              Type     Notes
78    -------------------------------------  -------  ----------------------
79    EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE  bitmask  Optimal window surface
80                                                    orientation.
81
82
83    Add a paragraph to section 3.4, section Other EGLConfig Attribute
84    Descriptions.
85
86    "EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE is a mask indicating which
87    window surface orientation will provide the best performance."
88
89    Add to table 3.4 (Default values and match criteria for EGLConfig
90    attributes):
91
92    Attribute                              Default  Selection  Sort     Sort
93                                                    Criteria   Order    Priority
94    -------------------------------------  -------  ---------  -------  --------
95    EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE  0        Exact      None
96
97    Add a paragraph to section 3.5.1, section Creating On-Screen Rendering
98    Surfaces.
99
100    EGL_SURFACE_ORIENTATION_ANGLE attribute specifies how the surface's content
101    will appear on the screen. If its value contains
102    EGL_SURFACE_ORIENTATION_INVERT_X_ANGLE then all displayed content will be
103    inverted along the vertical axis. Similarly, if its value contains
104    EGL_SURFACE_ORIENTATION_INVERT_Y_ANGLE then all displayed content will be
105    inverted along the horizontal axis.
106
107    Add to table 3.5 (Queryable surface attributes and types):
108
109    Attribute                      Type     Description
110    -----------------------------  -------  ----------------------
111    EGL_SURFACE_ORIENTATION_ANGLE  bitmask  Orientation of surface
112
113    Add a paragraph to section 3.5.6, Surface Attributes:
114
115    "Querying EGL_SURFACE_ORIENTATION_ANGLE returns the orientation of the
116    surface.  For a window surface, this is the same attribute value specified
117    when the surface was created.  For other types of surfaces, it is always
118    0."
119
120Issues
121
122    1) What about dirty regions and sub regions specified by extensions such as
123       NV_post_sub_buffer?
124
125       These regions will be applied to the same region of the window as
126       before because they are often specified based on events from the
127       operating system.  The content in these regions will be displayed
128       according to the value of EGL_SURFACE_ORIENTATION_ANGLE.
129
130Revision History
131
132    Version 1, 2015-12-15 (Geoff Lang)
133      - Initial draft
134