27 down from the top) is a two-dimensional representation composed from a series |
27 down from the top) is a two-dimensional representation composed from a series |
28 of layers. </p> |
28 of layers. </p> |
29 <fig id="GUID-19D41F69-1264-5726-9CDD-C4DD0F231BE3"> |
29 <fig id="GUID-19D41F69-1264-5726-9CDD-C4DD0F231BE3"> |
30 <title> The display is an orthogonal view of a series of layers. |
30 <title> The display is an orthogonal view of a series of layers. |
31 </title> |
31 </title> |
32 <image href="GUID-7F3F89C0-999A-552E-90BB-17D720C53DE6_d0e191278_href.png" placement="inline"/> |
32 <image href="GUID-7F3F89C0-999A-552E-90BB-17D720C53DE6_d0e184682_href.png" placement="inline"/> |
33 </fig> |
33 </fig> |
34 <p>Composition requires: </p> |
34 <p>Composition requires: </p> |
35 <ul> |
35 <ul> |
36 <li id="GUID-7C593A87-268F-59E1-B295-9DE2A0DF3092"><p>Calculations based on |
36 <li id="GUID-7C593A87-268F-59E1-B295-9DE2A0DF3092"><p>Calculations based on |
37 the size, position, visibility, transparency and ordering of the layers to |
37 the size, position, visibility, transparency and ordering of the layers to |
66 a surface stores a large amount of data and its handling requires more consideration. </p> |
66 a surface stores a large amount of data and its handling requires more consideration. </p> |
67 <p>The diagram below is a simplistic representation of how applications create |
67 <p>The diagram below is a simplistic representation of how applications create |
68 output which is rendered, composited and displayed. </p> |
68 output which is rendered, composited and displayed. </p> |
69 <fig id="GUID-9DF4C86A-C06D-5C5A-9AB6-E9991CC1937A"> |
69 <fig id="GUID-9DF4C86A-C06D-5C5A-9AB6-E9991CC1937A"> |
70 <title> Graphics Composition </title> |
70 <title> Graphics Composition </title> |
71 <image href="GUID-F31EC49A-FE01-58B2-9CB5-4A3BBCCB7DA7_d0e191342_href.png" placement="inline"/> |
71 <image href="GUID-F31EC49A-FE01-58B2-9CB5-4A3BBCCB7DA7_d0e184746_href.png" placement="inline"/> |
72 </fig> |
72 </fig> |
73 <p>In a device with graphics acceleration hardware (a Graphics Processing |
73 <p>In a device with graphics acceleration hardware (a Graphics Processing |
74 Unit or GPU) there might, in addition to the memory managed by the CPU, be |
74 Unit or GPU) there might, in addition to the memory managed by the CPU, be |
75 additional memory managed by the GPU. Image data may therefore be considered |
75 additional memory managed by the GPU. Image data may therefore be considered |
76 to have been <b>software rendered</b> (onto a surface in CPU memory) or <b>hardware |
76 to have been <b>software rendered</b> (onto a surface in CPU memory) or <b>hardware |
77 rendered</b> (onto a surface in hardware accelerated GPU memory). The following |
77 rendered</b> (onto a surface in hardware accelerated GPU memory). The following |
78 diagram shows applications and other graphical data sources rendering to surfaces |
78 diagram shows applications and other graphical data sources rendering to surfaces |
79 in software and hardware. </p> |
79 in software and hardware. </p> |
80 <fig id="GUID-2717F861-0045-5598-A3EC-7CF678BEFA70"> |
80 <fig id="GUID-2717F861-0045-5598-A3EC-7CF678BEFA70"> |
81 <title> Hardware rendered graphics - the wrong way! </title> |
81 <title> Hardware rendered graphics - the wrong way! </title> |
82 <image href="GUID-EADC4EA6-4492-5A00-A29E-6F7747FCAAC9_d0e191359_href.png" placement="inline"/> |
82 <image href="GUID-EADC4EA6-4492-5A00-A29E-6F7747FCAAC9_d0e184763_href.png" placement="inline"/> |
83 </fig> |
83 </fig> |
84 <p>The diagram, however, represents a system with several problem areas that |
84 <p>The diagram, however, represents a system with several problem areas that |
85 would render it unsuitable for any practical implementation </p> |
85 would render it unsuitable for any practical implementation </p> |
86 <ul> |
86 <ul> |
87 <li id="GUID-AF13B0A1-3DC0-576D-81B1-6DF66AA9FA77"><p>In practice it is likely |
87 <li id="GUID-AF13B0A1-3DC0-576D-81B1-6DF66AA9FA77"><p>In practice it is likely |
114 most cases this is not apparent to the viewer. Surfaces that are physically |
114 most cases this is not apparent to the viewer. Surfaces that are physically |
115 composed behind the UI appear in the correct position on the two-dimensional |
115 composed behind the UI appear in the correct position on the two-dimensional |
116 display. The diagram below illustrates how Window Server-rendered UI content |
116 display. The diagram below illustrates how Window Server-rendered UI content |
117 and external surfaces are composited using the UI surface. </p> <fig id="GUID-3448FD6B-9A39-58CD-8819-39B0B6CC4E13"> |
117 and external surfaces are composited using the UI surface. </p> <fig id="GUID-3448FD6B-9A39-58CD-8819-39B0B6CC4E13"> |
118 <title> Hardware composition and the Flattened UI </title> |
118 <title> Hardware composition and the Flattened UI </title> |
119 <image href="GUID-B0797210-4EE3-557B-A5A6-D215D030BA0E_d0e191406_href.png" placement="inline"/> |
119 <image href="GUID-B0797210-4EE3-557B-A5A6-D215D030BA0E_d0e184810_href.png" placement="inline"/> |
120 </fig> <p>Although this method of composition is flexible and powerful, it |
120 </fig> <p>Although this method of composition is flexible and powerful, it |
121 does have some limitations, particularly with respect to semi-transparent |
121 does have some limitations, particularly with respect to semi-transparent |
122 hardware-accelerated surfaces. </p> <p>It is not possible, for example, to |
122 hardware-accelerated surfaces. </p> <p>It is not possible, for example, to |
123 include a semi-transparent surface in front of the UI surface. In such cases |
123 include a semi-transparent surface in front of the UI surface. In such cases |
124 the composition engine determines how the display is composed. </p> <p>Here |
124 the composition engine determines how the display is composed. </p> <p>Here |
126 same composition might be achieved in practice. The UI menus, windows and |
126 same composition might be achieved in practice. The UI menus, windows and |
127 dialogs are composited by the Window Server onto a single surface. The light |
127 dialogs are composited by the Window Server onto a single surface. The light |
128 green layer displays a hardware rendered surface so it is actually behind |
128 green layer displays a hardware rendered surface so it is actually behind |
129 the layer on which it appears. </p> <fig id="GUID-1FB1194D-FCAE-534C-94DC-AF4CF00E3A1C"> |
129 the layer on which it appears. </p> <fig id="GUID-1FB1194D-FCAE-534C-94DC-AF4CF00E3A1C"> |
130 <title> The UI surface </title> |
130 <title> The UI surface </title> |
131 <image href="GUID-79009102-0490-5C61-9722-C5EE49A1AF2B_d0e191423_href.png" placement="inline"/> |
131 <image href="GUID-79009102-0490-5C61-9722-C5EE49A1AF2B_d0e184827_href.png" placement="inline"/> |
132 </fig> </section> |
132 </fig> </section> |
133 <section id="GUID-41E9CA54-759F-5651-95F8-9F39808BE740"><title>Composition |
133 <section id="GUID-41E9CA54-759F-5651-95F8-9F39808BE740"><title>Composition |
134 Examples</title> <p>This illustrations below illustrate the use of hardware |
134 Examples</title> <p>This illustrations below illustrate the use of hardware |
135 accelerated surfaces and the UI surface </p> <fig id="GUID-8178DBA8-E10C-56F3-A828-80746CE6A993"> |
135 accelerated surfaces and the UI surface </p> <fig id="GUID-8178DBA8-E10C-56F3-A828-80746CE6A993"> |
136 <title> Video rendered to a hardware accelerated surface mapped |
136 <title> Video rendered to a hardware accelerated surface mapped |
137 to a layer behind the UI surface </title> |
137 to a layer behind the UI surface </title> |
138 <image href="GUID-FE3C8D39-CE17-5AC7-AB6A-4D6664D52196_d0e191439_href.png" placement="inline"/> |
138 <image href="GUID-FE3C8D39-CE17-5AC7-AB6A-4D6664D52196_d0e184843_href.png" placement="inline"/> |
139 </fig> <fig id="GUID-51411B10-6DC3-5B74-BCEF-11EC1D0FBCA8"> |
139 </fig> <fig id="GUID-51411B10-6DC3-5B74-BCEF-11EC1D0FBCA8"> |
140 <title> As above with a semi-transparent dialog on the UI surface |
140 <title> As above with a semi-transparent dialog on the UI surface |
141 </title> |
141 </title> |
142 <image href="GUID-4616CCC9-7BD3-5D91-873A-6027167329ED_d0e191447_href.png" placement="inline"/> |
142 <image href="GUID-4616CCC9-7BD3-5D91-873A-6027167329ED_d0e184851_href.png" placement="inline"/> |
143 </fig> </section> |
143 </fig> </section> |
144 </conbody><related-links> |
144 </conbody><related-links> |
145 <link href="GUID-D93978BE-11A3-5CE3-B110-1DEAA5AD566C.dita"><linktext>The ScreenPlay |
145 <link href="GUID-D93978BE-11A3-5CE3-B110-1DEAA5AD566C.dita"><linktext>The ScreenPlay |
146 Architecture</linktext></link> |
146 Architecture</linktext></link> |
147 <link href="GUID-EF62BF88-3687-505D-8BD7-EEDF36246E56.dita"><linktext>Hardware |
147 <link href="GUID-EF62BF88-3687-505D-8BD7-EEDF36246E56.dita"><linktext>Hardware |