• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    ANGLE_window_fixed_size
4
5Name Strings
6
7    EGL_ANGLE_window_fixed_size
8
9Contributors
10
11    John Bauman
12    Shannon Woods
13    Geoff Lang
14
15Contacts
16
17    John Bauman, Google Inc. (jbauman 'at' google.com)
18
19Status
20
21    Complete
22
23Version
24
25    Version 5, July 23, 2018
26
27Number
28
29    EGL Extension #??
30
31Dependencies
32
33    This extension is written against the wording of the EGL 1.4
34    Specification.
35
36Overview
37
38    This extension allows creating a window surface that does not resize
39    automatically.
40
41New Types
42
43    None
44
45New Procedures and Functions
46
47    None
48
49New Tokens
50
51    Accepted by the <attribute> parameter of eglQuerySurface and by the
52    <attrib_list> parameter of eglCreateWindowSurface:
53
54    EGL_FIXED_SIZE_ANGLE        0x3201
55
56Additions to Chapter 3 of the EGL 1.4 Specification:
57
58    Modify the third paragraph of Section 3.5.1 (Creating On-Screen Rendering
59    Surfaces)
60
61    "<attrib_list> specifies a list of attributes for the window. The list has
62    the same structure as described for eglChooseConfig.  Attributes that can
63    be specified in <attrib_list> include EGL_RENDER_BUFFER,
64    EGL_VG_COLORSPACE, EGL_VG_ALPHA_FORMAT, EGL_FIXED_SIZE_ANGLE, EGL_WIDTH,
65    and EGL_HEIGHT."
66
67    Add before the last paragraph of Section 3.5.1
68
69    "EGL_FIXED_SIZE_ANGLE specifies whether the surface must be resized by the
70    implementation when the native window is resized.  The default value is
71    EGL_FALSE.  Its value can be EGL_TRUE, in which case the size must be
72    specified when the window is created, or EGL_FALSE, in which case the size
73    is taken from the native window. Its default value is EGL_FALSE.
74
75    If the value of EGL_FIXED_SIZE_ANGLE is EGL_TRUE, the window surface's
76    size in pixels is specified by the EGL_WIDTH and EGL_HEIGHT attributes.
77    If its value is EGL_FALSE, then the values of EGL_WIDTH and EGL_HEIGHT
78    are ignored and the window surface must be resized by the implementation
79    subsequent to the native window being resized, and prior to copying its
80    contents to the native window (e.g. in eglSwapBuffers, as described in
81    section 3.9.1.1). The default values for EGL_WIDTH and EGL_HEIGHT are zero.
82    If the value specified for either of EGL_WIDTH or EGL_HEIGHT is less than
83    zero then an EGL_BAD_PARAMETER error is generated."
84
85    Add the following entry to Table 3.5
86    (Queryable surface attributes and types)
87
88    Attribute            Type    Description
89    -------------------- ------- ---------------------------------------------
90    EGL_FIXED_SIZE_ANGLE boolean Surface will not be resized with a native
91                                 window
92
93    Replace the last paragraph on page 37 in Section 3.5.6 (Surface Attributes)
94
95    "Querying EGL_WIDTH and EGL_HEIGHT returns respectively the width and
96    height, in pixels, of the surface. For a pixmap surface or window surface
97    with EGL_FIXED_SIZE_ANGLE set to EGL_FALSE, these values are initially
98    equal to the width and height of the native window or pixmap with respect
99    to which the surface was created. If the native window is resized and the
100    corresponding window surface is not fixed size, the corresponding window
101    surface will eventually be resized by the implementation to match (as
102    discussed in section 3.9.1). If there is a discrepancy because EGL has not
103    yet resized the window surface, the size returned by eglQuerySurface will
104    always be that of the EGL surface, not the corresponding native window."
105
106    Alter the beginning of the first paragraph of Section 3.5.6 (Surface
107    Attributes)
108
109    "The specified attribute of surface is set to value. Attributes that can
110    be specified are EGL_MIPMAP_LEVEL, EGL_MULTISAMPLE_RESOLVE,
111    EGL_SWAP_BEHAVIOR, EGL_WIDTH, and EGL_HEIGHT."
112
113    Add the following paragraph to Section 3.5.6 (Surface Attributes)
114
115    "If attribute is EGL_WIDTH or EGL_HEIGHT then the value specifies the new
116    surface width or height respectively. The new width and height are not
117    guarenteed to be applied until the next call to eglSwapBuffers or
118    eglWaitNative. If the surface does not have EGL_FIXED_SIZE_ANGLE set then
119    an EGL_BAD_MATCH error is generated."
120
121    Add the following paragraph to Section 3.5.6 (Surface Attributes)
122
123    "Querying EGL_FIXED_SIZE_ANGLE returns EGL_FALSE if the surface will be
124    resized to match a native window, and EGL_TRUE if the surface cannot be
125    resized."
126
127    Alter the beginning of the first paragraph of Section 3.9.1.1 (Native
128    Window Resizing)
129
130    "If the surface has EGL_FIXED_SIZE_ANGLE set and EGL_WIDTH or EGL_HEIGHT
131    have changed or the surface does not have EGL_FIXED_SIZE_ANGLE set and its
132    corresponding native window has been resized prior to the swap, surface
133    must be resized to match".
134
135Issues
136
137    1. Should there be a way to resize a window surface that had its size
138    specified initially.
139
140    RESOLVED: No. Surfaces that have their sizes specified initially must have
141    EGL_FIXED_SIZE_ANGLE set and can never be resized.
142
143    RESOLVED(rev 5): Fixed size surfaces can now be resized by setting
144    EGL_WIDTH and EGL_HEIGHT surface attributes. This is the best way to give
145    users explicit control of the size of window surfaces without re-creating
146    them on each resize.
147
148Revision History
149
150    Version 5, 2018/07/23 - Allow reizing fixed size surfaces.
151
152    Version 4, 2014/02/24 - formatting changes.
153
154    Version 3, 2014/02/12 - ignore EGL_WIDTH and EGL_HEIGHT if
155    EGL_FIXED_SIZE_ANGLE is EGL_FALSE
156
157    Version 2, 2014/02/07 - rename to EGL_ANGLE_window_fixed_size, and add an
158    EGL_FIXED_SIZE_ANGLE token.
159
160    Version 1, 2014/02/05 - first draft.
161