Commit dac46dcf913585956a0e7a838e6f4b7465f00f57

Authored by Loren Huang
1 parent ba5139e1da

ENGR00300876 [#ccc] Fix flick issue in GAL2D compositor

Move wl_surface_commit to work thread.
Fix memory leak in wl_egl_window_resize.

Date: Jul 10, 2014
Signed-off-by Yong Gan <yong.gan@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit c114ec8a4c74fc2a2d0f64c60031c66d2225ff83)

Showing 1 changed file with 14 additions and 3 deletions Inline Diff

drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h
1 /**************************************************************************** 1 /****************************************************************************
2 * 2 *
3 * Copyright (C) 2005 - 2013 by Vivante Corp. 3 * Copyright (C) 2005 - 2013 by Vivante Corp.
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the license, or 7 * the Free Software Foundation; either version 2 of the license, or
8 * (at your option) any later version. 8 * (at your option) any later version.
9 * 9 *
10 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not write to the Free Software 16 * along with this program; if not write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 * 18 *
19 *****************************************************************************/ 19 *****************************************************************************/
20 20
21 #ifndef __gc_hal_eglplatform_h_ 21 #ifndef __gc_hal_eglplatform_h_
22 #define __gc_hal_eglplatform_h_ 22 #define __gc_hal_eglplatform_h_
23 23
24 /* Include VDK types. */ 24 /* Include VDK types. */
25 #include "gc_hal_types.h" 25 #include "gc_hal_types.h"
26 #include "gc_hal_base.h" 26 #include "gc_hal_base.h"
27 #include "gc_hal_eglplatform_type.h" 27 #include "gc_hal_eglplatform_type.h"
28 #ifdef __cplusplus 28 #ifdef __cplusplus
29 extern "C" { 29 extern "C" {
30 #endif 30 #endif
31 31
32 32
33 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) 33 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
34 /* Win32 and Windows CE platforms. */ 34 /* Win32 and Windows CE platforms. */
35 #include <windows.h> 35 #include <windows.h>
36 typedef HDC HALNativeDisplayType; 36 typedef HDC HALNativeDisplayType;
37 typedef HWND HALNativeWindowType; 37 typedef HWND HALNativeWindowType;
38 typedef HBITMAP HALNativePixmapType; 38 typedef HBITMAP HALNativePixmapType;
39 39
40 typedef struct __BITFIELDINFO{ 40 typedef struct __BITFIELDINFO{
41 BITMAPINFO bmi; 41 BITMAPINFO bmi;
42 RGBQUAD bmiColors[2]; 42 RGBQUAD bmiColors[2];
43 } BITFIELDINFO; 43 } BITFIELDINFO;
44 44
45 #elif defined(LINUX) && defined(EGL_API_DFB) && !defined(__APPLE__) 45 #elif defined(LINUX) && defined(EGL_API_DFB) && !defined(__APPLE__)
46 #include <directfb.h> 46 #include <directfb.h>
47 typedef struct _DFBDisplay * HALNativeDisplayType; 47 typedef struct _DFBDisplay * HALNativeDisplayType;
48 typedef struct _DFBWindow * HALNativeWindowType; 48 typedef struct _DFBWindow * HALNativeWindowType;
49 typedef struct _DFBPixmap * HALNativePixmapType; 49 typedef struct _DFBPixmap * HALNativePixmapType;
50 50
51 #elif defined(LINUX) && defined(EGL_API_FB) && !defined(__APPLE__) 51 #elif defined(LINUX) && defined(EGL_API_FB) && !defined(__APPLE__)
52 52
53 #if defined(EGL_API_WL) 53 #if defined(EGL_API_WL)
54 /* Wayland platform. */ 54 /* Wayland platform. */
55 #include "wayland-server.h" 55 #include "wayland-server.h"
56 #include <wayland-egl.h> 56 #include <wayland-egl.h>
57 57
58 #define WL_EGL_NUM_BACKBUFFERS 2 58 #define WL_EGL_NUM_BACKBUFFERS 3
59 59
60 typedef struct _gcsWL_VIV_BUFFER 60 typedef struct _gcsWL_VIV_BUFFER
61 { 61 {
62 struct wl_buffer wl_buffer; 62 struct wl_resource *wl_buffer;
63 gcoSURF surface; 63 gcoSURF surface;
64 gctINT32 width, height;
64 } gcsWL_VIV_BUFFER; 65 } gcsWL_VIV_BUFFER;
65 66
66 typedef struct _gcsWL_EGL_DISPLAY 67 typedef struct _gcsWL_EGL_DISPLAY
67 { 68 {
68 struct wl_display* wl_display; 69 struct wl_display* wl_display;
69 struct wl_viv* wl_viv; 70 struct wl_viv* wl_viv;
71 struct wl_registry *registry;
72 struct wl_event_queue *wl_queue;
70 } gcsWL_EGL_DISPLAY; 73 } gcsWL_EGL_DISPLAY;
71 74
72 typedef struct _gcsWL_EGL_BUFFER_INFO 75 typedef struct _gcsWL_EGL_BUFFER_INFO
73 { 76 {
74 gctINT32 width; 77 gctINT32 width;
75 gctINT32 height; 78 gctINT32 height;
76 gctINT32 stride; 79 gctINT32 stride;
77 gceSURF_FORMAT format; 80 gceSURF_FORMAT format;
78 gcuVIDMEM_NODE_PTR node; 81 gcuVIDMEM_NODE_PTR node;
79 gcePOOL pool; 82 gcePOOL pool;
80 gctUINT bytes; 83 gctUINT bytes;
81 gcoSURF surface; 84 gcoSURF surface;
85 gcoSURF attached_surface;
86 gctINT32 invalidate;
87 gctBOOL locked;
82 } gcsWL_EGL_BUFFER_INFO; 88 } gcsWL_EGL_BUFFER_INFO;
83 89
84 typedef struct _gcsWL_EGL_BUFFER 90 typedef struct _gcsWL_EGL_BUFFER
85 { 91 {
86 struct wl_buffer* wl_buffer; 92 struct wl_buffer* wl_buffer;
87 gcsWL_EGL_BUFFER_INFO info; 93 gcsWL_EGL_BUFFER_INFO info;
88 } gcsWL_EGL_BUFFER; 94 } gcsWL_EGL_BUFFER;
89 95
90 typedef struct _gcsWL_EGL_WINDOW_INFO 96 typedef struct _gcsWL_EGL_WINDOW_INFO
91 { 97 {
98 gctINT32 dx;
99 gctINT32 dy;
92 gctUINT width; 100 gctUINT width;
93 gctUINT height; 101 gctUINT height;
102 gctINT32 attached_width;
103 gctINT32 attached_height;
94 gceSURF_FORMAT format; 104 gceSURF_FORMAT format;
95 gctUINT bpp; 105 gctUINT bpp;
96 } gcsWL_EGL_WINDOW_INFO; 106 } gcsWL_EGL_WINDOW_INFO;
97 107
98 struct wl_egl_window 108 struct wl_egl_window
99 { 109 {
110 gcsWL_EGL_DISPLAY* display;
100 gcsWL_EGL_BUFFER backbuffers[WL_EGL_NUM_BACKBUFFERS]; 111 gcsWL_EGL_BUFFER backbuffers[WL_EGL_NUM_BACKBUFFERS];
101 gcsWL_EGL_WINDOW_INFO info; 112 gcsWL_EGL_WINDOW_INFO info;
102 gctUINT current; 113 gctUINT current;
103 struct wl_surface* surface; 114 struct wl_surface* surface;
104 struct wl_callback* pending; 115 struct wl_callback* frame_callback;
105 }; 116 };
106 117
107 typedef void* HALNativeDisplayType; 118 typedef void* HALNativeDisplayType;
108 typedef void* HALNativeWindowType; 119 typedef void* HALNativeWindowType;
109 typedef void* HALNativePixmapType; 120 typedef void* HALNativePixmapType;
110 #else 121 #else
111 /* Linux platform for FBDEV. */ 122 /* Linux platform for FBDEV. */
112 typedef struct _FBDisplay * HALNativeDisplayType; 123 typedef struct _FBDisplay * HALNativeDisplayType;
113 typedef struct _FBWindow * HALNativeWindowType; 124 typedef struct _FBWindow * HALNativeWindowType;
114 typedef struct _FBPixmap * HALNativePixmapType; 125 typedef struct _FBPixmap * HALNativePixmapType;
115 #endif 126 #endif
116 #elif defined(__ANDROID__) || defined(ANDROID) 127 #elif defined(__ANDROID__) || defined(ANDROID)
117 128
118 struct egl_native_pixmap_t; 129 struct egl_native_pixmap_t;
119 130
120 #if ANDROID_SDK_VERSION >= 9 131 #if ANDROID_SDK_VERSION >= 9
121 #include <android/native_window.h> 132 #include <android/native_window.h>
122 133
123 typedef struct ANativeWindow* HALNativeWindowType; 134 typedef struct ANativeWindow* HALNativeWindowType;
124 typedef struct egl_native_pixmap_t* HALNativePixmapType; 135 typedef struct egl_native_pixmap_t* HALNativePixmapType;
125 typedef void* HALNativeDisplayType; 136 typedef void* HALNativeDisplayType;
126 #else 137 #else
127 struct android_native_window_t; 138 struct android_native_window_t;
128 typedef struct android_native_window_t* HALNativeWindowType; 139 typedef struct android_native_window_t* HALNativeWindowType;
129 typedef struct egl_native_pixmap_t * HALNativePixmapType; 140 typedef struct egl_native_pixmap_t * HALNativePixmapType;
130 typedef void* HALNativeDisplayType; 141 typedef void* HALNativeDisplayType;
131 #endif 142 #endif
132 143
133 #elif defined(LINUX) || defined(__APPLE__) 144 #elif defined(LINUX) || defined(__APPLE__)
134 /* X11 platform. */ 145 /* X11 platform. */
135 #include <X11/Xlib.h> 146 #include <X11/Xlib.h>
136 #include <X11/Xutil.h> 147 #include <X11/Xutil.h>
137 148
138 typedef Display * HALNativeDisplayType; 149 typedef Display * HALNativeDisplayType;
139 typedef Window HALNativeWindowType; 150 typedef Window HALNativeWindowType;
140 151
141 #ifdef CUSTOM_PIXMAP 152 #ifdef CUSTOM_PIXMAP
142 typedef void * HALNativePixmapType; 153 typedef void * HALNativePixmapType;
143 #else 154 #else
144 typedef Pixmap HALNativePixmapType; 155 typedef Pixmap HALNativePixmapType;
145 #endif /* CUSTOM_PIXMAP */ 156 #endif /* CUSTOM_PIXMAP */
146 157
147 /* Rename some badly named X defines. */ 158 /* Rename some badly named X defines. */
148 #ifdef Status 159 #ifdef Status
149 # define XStatus int 160 # define XStatus int
150 # undef Status 161 # undef Status
151 #endif 162 #endif
152 #ifdef Always 163 #ifdef Always
153 # define XAlways 2 164 # define XAlways 2
154 # undef Always 165 # undef Always
155 #endif 166 #endif
156 #ifdef CurrentTime 167 #ifdef CurrentTime
157 # undef CurrentTime 168 # undef CurrentTime
158 # define XCurrentTime 0 169 # define XCurrentTime 0
159 #endif 170 #endif
160 171
161 #elif defined(__QNXNTO__) 172 #elif defined(__QNXNTO__)
162 #include <screen/screen.h> 173 #include <screen/screen.h>
163 174
164 /* VOID */ 175 /* VOID */
165 typedef int HALNativeDisplayType; 176 typedef int HALNativeDisplayType;
166 typedef screen_window_t HALNativeWindowType; 177 typedef screen_window_t HALNativeWindowType;
167 typedef screen_pixmap_t HALNativePixmapType; 178 typedef screen_pixmap_t HALNativePixmapType;
168 179
169 #else 180 #else
170 181
171 #error "Platform not recognized" 182 #error "Platform not recognized"
172 183
173 /* VOID */ 184 /* VOID */
174 typedef void * HALNativeDisplayType; 185 typedef void * HALNativeDisplayType;
175 typedef void * HALNativeWindowType; 186 typedef void * HALNativeWindowType;
176 typedef void * HALNativePixmapType; 187 typedef void * HALNativePixmapType;
177 188
178 #endif 189 #endif
179 190
180 /* define DUMMY according to the system */ 191 /* define DUMMY according to the system */
181 #if defined(EGL_API_WL) 192 #if defined(EGL_API_WL)
182 # define WL_DUMMY (31415926) 193 # define WL_DUMMY (31415926)
183 # define EGL_DUMMY WL_DUMMY 194 # define EGL_DUMMY WL_DUMMY
184 #elif defined(__ANDROID__) || defined(ANDROID) 195 #elif defined(__ANDROID__) || defined(ANDROID)
185 # define ANDROID_DUMMY (31415926) 196 # define ANDROID_DUMMY (31415926)
186 # define EGL_DUMMY ANDROID_DUMMY 197 # define EGL_DUMMY ANDROID_DUMMY
187 #else 198 #else
188 # define EGL_DUMMY (31415926) 199 # define EGL_DUMMY (31415926)
189 #endif 200 #endif
190 201
191 /******************************************************************************* 202 /*******************************************************************************
192 ** Display. ******************************************************************** 203 ** Display. ********************************************************************
193 */ 204 */
194 205
195 gceSTATUS 206 gceSTATUS
196 gcoOS_GetDisplay( 207 gcoOS_GetDisplay(
197 OUT HALNativeDisplayType * Display, 208 OUT HALNativeDisplayType * Display,
198 IN gctPOINTER Context 209 IN gctPOINTER Context
199 ); 210 );
200 211
201 gceSTATUS 212 gceSTATUS
202 gcoOS_GetDisplayByIndex( 213 gcoOS_GetDisplayByIndex(
203 IN gctINT DisplayIndex, 214 IN gctINT DisplayIndex,
204 OUT HALNativeDisplayType * Display, 215 OUT HALNativeDisplayType * Display,
205 IN gctPOINTER Context 216 IN gctPOINTER Context
206 ); 217 );
207 218
208 gceSTATUS 219 gceSTATUS
209 gcoOS_GetDisplayInfo( 220 gcoOS_GetDisplayInfo(
210 IN HALNativeDisplayType Display, 221 IN HALNativeDisplayType Display,
211 OUT gctINT * Width, 222 OUT gctINT * Width,
212 OUT gctINT * Height, 223 OUT gctINT * Height,
213 OUT gctSIZE_T * Physical, 224 OUT gctSIZE_T * Physical,
214 OUT gctINT * Stride, 225 OUT gctINT * Stride,
215 OUT gctINT * BitsPerPixel 226 OUT gctINT * BitsPerPixel
216 ); 227 );
217 228
218 229
219 230
220 gceSTATUS 231 gceSTATUS
221 gcoOS_GetDisplayInfoEx( 232 gcoOS_GetDisplayInfoEx(
222 IN HALNativeDisplayType Display, 233 IN HALNativeDisplayType Display,
223 IN HALNativeWindowType Window, 234 IN HALNativeWindowType Window,
224 IN gctUINT DisplayInfoSize, 235 IN gctUINT DisplayInfoSize,
225 OUT halDISPLAY_INFO * DisplayInfo 236 OUT halDISPLAY_INFO * DisplayInfo
226 ); 237 );
227 238
228 gceSTATUS 239 gceSTATUS
229 gcoOS_GetNextDisplayInfoExByIndex( 240 gcoOS_GetNextDisplayInfoExByIndex(
230 IN gctINT Index, 241 IN gctINT Index,
231 IN HALNativeDisplayType Display, 242 IN HALNativeDisplayType Display,
232 IN HALNativeWindowType Window, 243 IN HALNativeWindowType Window,
233 IN gctUINT DisplayInfoSize, 244 IN gctUINT DisplayInfoSize,
234 OUT halDISPLAY_INFO * DisplayInfo 245 OUT halDISPLAY_INFO * DisplayInfo
235 ); 246 );
236 247
237 gceSTATUS 248 gceSTATUS
238 gcoOS_GetDisplayVirtual( 249 gcoOS_GetDisplayVirtual(
239 IN HALNativeDisplayType Display, 250 IN HALNativeDisplayType Display,
240 OUT gctINT * Width, 251 OUT gctINT * Width,
241 OUT gctINT * Height 252 OUT gctINT * Height
242 ); 253 );
243 254
244 gceSTATUS 255 gceSTATUS
245 gcoOS_GetDisplayBackbuffer( 256 gcoOS_GetDisplayBackbuffer(
246 IN HALNativeDisplayType Display, 257 IN HALNativeDisplayType Display,
247 IN HALNativeWindowType Window, 258 IN HALNativeWindowType Window,
248 OUT gctPOINTER * context, 259 OUT gctPOINTER * context,
249 OUT gcoSURF * surface, 260 OUT gcoSURF * surface,
250 OUT gctUINT * Offset, 261 OUT gctUINT * Offset,
251 OUT gctINT * X, 262 OUT gctINT * X,
252 OUT gctINT * Y 263 OUT gctINT * Y
253 ); 264 );
254 265
255 gceSTATUS 266 gceSTATUS
256 gcoOS_SetDisplayVirtual( 267 gcoOS_SetDisplayVirtual(
257 IN HALNativeDisplayType Display, 268 IN HALNativeDisplayType Display,
258 IN HALNativeWindowType Window, 269 IN HALNativeWindowType Window,
259 IN gctUINT Offset, 270 IN gctUINT Offset,
260 IN gctINT X, 271 IN gctINT X,
261 IN gctINT Y 272 IN gctINT Y
262 ); 273 );
263 274
264 gceSTATUS 275 gceSTATUS
265 gcoOS_SetDisplayVirtualEx( 276 gcoOS_SetDisplayVirtualEx(
266 IN HALNativeDisplayType Display, 277 IN HALNativeDisplayType Display,
267 IN HALNativeWindowType Window, 278 IN HALNativeWindowType Window,
268 IN gctPOINTER Context, 279 IN gctPOINTER Context,
269 IN gcoSURF Surface, 280 IN gcoSURF Surface,
270 IN gctUINT Offset, 281 IN gctUINT Offset,
271 IN gctINT X, 282 IN gctINT X,
272 IN gctINT Y 283 IN gctINT Y
273 ); 284 );
274 285
275 gceSTATUS 286 gceSTATUS
276 gcoOS_SetSwapInterval( 287 gcoOS_SetSwapInterval(
277 IN HALNativeDisplayType Display, 288 IN HALNativeDisplayType Display,
278 IN gctINT Interval 289 IN gctINT Interval
279 ); 290 );
280 291
281 gceSTATUS 292 gceSTATUS
282 gcoOS_GetSwapInterval( 293 gcoOS_GetSwapInterval(
283 IN HALNativeDisplayType Display, 294 IN HALNativeDisplayType Display,
284 IN gctINT_PTR Min, 295 IN gctINT_PTR Min,
285 IN gctINT_PTR Max 296 IN gctINT_PTR Max
286 ); 297 );
287 298
288 gceSTATUS 299 gceSTATUS
289 gcoOS_DisplayBufferRegions( 300 gcoOS_DisplayBufferRegions(
290 IN HALNativeDisplayType Display, 301 IN HALNativeDisplayType Display,
291 IN HALNativeWindowType Window, 302 IN HALNativeWindowType Window,
292 IN gctINT NumRects, 303 IN gctINT NumRects,
293 IN gctINT_PTR Rects 304 IN gctINT_PTR Rects
294 ); 305 );
295 306
296 gceSTATUS 307 gceSTATUS
297 gcoOS_DestroyDisplay( 308 gcoOS_DestroyDisplay(
298 IN HALNativeDisplayType Display 309 IN HALNativeDisplayType Display
299 ); 310 );
300 311
301 gceSTATUS 312 gceSTATUS
302 gcoOS_InitLocalDisplayInfo( 313 gcoOS_InitLocalDisplayInfo(
303 IN HALNativeDisplayType Display, 314 IN HALNativeDisplayType Display,
304 IN OUT gctPOINTER * localDisplay 315 IN OUT gctPOINTER * localDisplay
305 ); 316 );
306 317
307 gceSTATUS 318 gceSTATUS
308 gcoOS_DeinitLocalDisplayInfo( 319 gcoOS_DeinitLocalDisplayInfo(
309 IN HALNativeDisplayType Display, 320 IN HALNativeDisplayType Display,
310 IN OUT gctPOINTER * localDisplay 321 IN OUT gctPOINTER * localDisplay
311 ); 322 );
312 323
313 gceSTATUS 324 gceSTATUS
314 gcoOS_GetDisplayInfoEx2( 325 gcoOS_GetDisplayInfoEx2(
315 IN HALNativeDisplayType Display, 326 IN HALNativeDisplayType Display,
316 IN HALNativeWindowType Window, 327 IN HALNativeWindowType Window,
317 IN gctPOINTER localDisplay, 328 IN gctPOINTER localDisplay,
318 IN gctUINT DisplayInfoSize, 329 IN gctUINT DisplayInfoSize,
319 OUT halDISPLAY_INFO * DisplayInfo 330 OUT halDISPLAY_INFO * DisplayInfo
320 ); 331 );
321 332
322 gceSTATUS 333 gceSTATUS
323 gcoOS_GetDisplayBackbufferEx( 334 gcoOS_GetDisplayBackbufferEx(
324 IN HALNativeDisplayType Display, 335 IN HALNativeDisplayType Display,
325 IN HALNativeWindowType Window, 336 IN HALNativeWindowType Window,
326 IN gctPOINTER localDisplay, 337 IN gctPOINTER localDisplay,
327 OUT gctPOINTER * context, 338 OUT gctPOINTER * context,
328 OUT gcoSURF * surface, 339 OUT gcoSURF * surface,
329 OUT gctUINT * Offset, 340 OUT gctUINT * Offset,
330 OUT gctINT * X, 341 OUT gctINT * X,
331 OUT gctINT * Y 342 OUT gctINT * Y
332 ); 343 );
333 344
334 gceSTATUS 345 gceSTATUS
335 gcoOS_IsValidDisplay( 346 gcoOS_IsValidDisplay(
336 IN HALNativeDisplayType Display 347 IN HALNativeDisplayType Display
337 ); 348 );
338 349
339 gceSTATUS 350 gceSTATUS
340 gcoOS_GetNativeVisualId( 351 gcoOS_GetNativeVisualId(
341 IN HALNativeDisplayType Display, 352 IN HALNativeDisplayType Display,
342 OUT gctINT* nativeVisualId 353 OUT gctINT* nativeVisualId
343 ); 354 );
344 355
345 gctBOOL 356 gctBOOL
346 gcoOS_SynchronousFlip( 357 gcoOS_SynchronousFlip(
347 IN HALNativeDisplayType Display 358 IN HALNativeDisplayType Display
348 ); 359 );
349 360
350 /******************************************************************************* 361 /*******************************************************************************
351 ** Windows. ******************************************************************** 362 ** Windows. ********************************************************************
352 */ 363 */
353 364
354 gceSTATUS 365 gceSTATUS
355 gcoOS_CreateWindow( 366 gcoOS_CreateWindow(
356 IN HALNativeDisplayType Display, 367 IN HALNativeDisplayType Display,
357 IN gctINT X, 368 IN gctINT X,
358 IN gctINT Y, 369 IN gctINT Y,
359 IN gctINT Width, 370 IN gctINT Width,
360 IN gctINT Height, 371 IN gctINT Height,
361 OUT HALNativeWindowType * Window 372 OUT HALNativeWindowType * Window
362 ); 373 );
363 374
364 gceSTATUS 375 gceSTATUS
365 gcoOS_GetWindowInfo( 376 gcoOS_GetWindowInfo(
366 IN HALNativeDisplayType Display, 377 IN HALNativeDisplayType Display,
367 IN HALNativeWindowType Window, 378 IN HALNativeWindowType Window,
368 OUT gctINT * X, 379 OUT gctINT * X,
369 OUT gctINT * Y, 380 OUT gctINT * Y,
370 OUT gctINT * Width, 381 OUT gctINT * Width,
371 OUT gctINT * Height, 382 OUT gctINT * Height,
372 OUT gctINT * BitsPerPixel, 383 OUT gctINT * BitsPerPixel,
373 OUT gctUINT * Offset 384 OUT gctUINT * Offset
374 ); 385 );
375 386
376 gceSTATUS 387 gceSTATUS
377 gcoOS_DestroyWindow( 388 gcoOS_DestroyWindow(
378 IN HALNativeDisplayType Display, 389 IN HALNativeDisplayType Display,
379 IN HALNativeWindowType Window 390 IN HALNativeWindowType Window
380 ); 391 );
381 392
382 gceSTATUS 393 gceSTATUS
383 gcoOS_DrawImage( 394 gcoOS_DrawImage(
384 IN HALNativeDisplayType Display, 395 IN HALNativeDisplayType Display,
385 IN HALNativeWindowType Window, 396 IN HALNativeWindowType Window,
386 IN gctINT Left, 397 IN gctINT Left,
387 IN gctINT Top, 398 IN gctINT Top,
388 IN gctINT Right, 399 IN gctINT Right,
389 IN gctINT Bottom, 400 IN gctINT Bottom,
390 IN gctINT Width, 401 IN gctINT Width,
391 IN gctINT Height, 402 IN gctINT Height,
392 IN gctINT BitsPerPixel, 403 IN gctINT BitsPerPixel,
393 IN gctPOINTER Bits 404 IN gctPOINTER Bits
394 ); 405 );
395 406
396 gceSTATUS 407 gceSTATUS
397 gcoOS_GetImage( 408 gcoOS_GetImage(
398 IN HALNativeWindowType Window, 409 IN HALNativeWindowType Window,
399 IN gctINT Left, 410 IN gctINT Left,
400 IN gctINT Top, 411 IN gctINT Top,
401 IN gctINT Right, 412 IN gctINT Right,
402 IN gctINT Bottom, 413 IN gctINT Bottom,
403 OUT gctINT * BitsPerPixel, 414 OUT gctINT * BitsPerPixel,
404 OUT gctPOINTER * Bits 415 OUT gctPOINTER * Bits
405 ); 416 );
406 417
407 gceSTATUS 418 gceSTATUS
408 gcoOS_GetWindowInfoEx( 419 gcoOS_GetWindowInfoEx(
409 IN HALNativeDisplayType Display, 420 IN HALNativeDisplayType Display,
410 IN HALNativeWindowType Window, 421 IN HALNativeWindowType Window,
411 OUT gctINT * X, 422 OUT gctINT * X,
412 OUT gctINT * Y, 423 OUT gctINT * Y,
413 OUT gctINT * Width, 424 OUT gctINT * Width,
414 OUT gctINT * Height, 425 OUT gctINT * Height,
415 OUT gctINT * BitsPerPixel, 426 OUT gctINT * BitsPerPixel,
416 OUT gctUINT * Offset, 427 OUT gctUINT * Offset,
417 OUT gceSURF_FORMAT * Format 428 OUT gceSURF_FORMAT * Format
418 ); 429 );
419 430
420 gceSTATUS 431 gceSTATUS
421 gcoOS_DrawImageEx( 432 gcoOS_DrawImageEx(
422 IN HALNativeDisplayType Display, 433 IN HALNativeDisplayType Display,
423 IN HALNativeWindowType Window, 434 IN HALNativeWindowType Window,
424 IN gctINT Left, 435 IN gctINT Left,
425 IN gctINT Top, 436 IN gctINT Top,
426 IN gctINT Right, 437 IN gctINT Right,
427 IN gctINT Bottom, 438 IN gctINT Bottom,
428 IN gctINT Width, 439 IN gctINT Width,
429 IN gctINT Height, 440 IN gctINT Height,
430 IN gctINT BitsPerPixel, 441 IN gctINT BitsPerPixel,
431 IN gctPOINTER Bits, 442 IN gctPOINTER Bits,
432 IN gceSURF_FORMAT Format 443 IN gceSURF_FORMAT Format
433 ); 444 );
434 445
435 /******************************************************************************* 446 /*******************************************************************************
436 ** Pixmaps. ******************************************************************** 447 ** Pixmaps. ********************************************************************
437 */ 448 */
438 449
439 gceSTATUS 450 gceSTATUS
440 gcoOS_CreatePixmap( 451 gcoOS_CreatePixmap(
441 IN HALNativeDisplayType Display, 452 IN HALNativeDisplayType Display,
442 IN gctINT Width, 453 IN gctINT Width,
443 IN gctINT Height, 454 IN gctINT Height,
444 IN gctINT BitsPerPixel, 455 IN gctINT BitsPerPixel,
445 OUT HALNativePixmapType * Pixmap 456 OUT HALNativePixmapType * Pixmap
446 ); 457 );
447 458
448 gceSTATUS 459 gceSTATUS
449 gcoOS_GetPixmapInfo( 460 gcoOS_GetPixmapInfo(
450 IN HALNativeDisplayType Display, 461 IN HALNativeDisplayType Display,
451 IN HALNativePixmapType Pixmap, 462 IN HALNativePixmapType Pixmap,
452 OUT gctINT * Width, 463 OUT gctINT * Width,
453 OUT gctINT * Height, 464 OUT gctINT * Height,
454 OUT gctINT * BitsPerPixel, 465 OUT gctINT * BitsPerPixel,
455 OUT gctINT * Stride, 466 OUT gctINT * Stride,
456 OUT gctPOINTER * Bits 467 OUT gctPOINTER * Bits
457 ); 468 );
458 469
459 gceSTATUS 470 gceSTATUS
460 gcoOS_DrawPixmap( 471 gcoOS_DrawPixmap(
461 IN HALNativeDisplayType Display, 472 IN HALNativeDisplayType Display,
462 IN HALNativePixmapType Pixmap, 473 IN HALNativePixmapType Pixmap,
463 IN gctINT Left, 474 IN gctINT Left,
464 IN gctINT Top, 475 IN gctINT Top,
465 IN gctINT Right, 476 IN gctINT Right,
466 IN gctINT Bottom, 477 IN gctINT Bottom,
467 IN gctINT Width, 478 IN gctINT Width,
468 IN gctINT Height, 479 IN gctINT Height,
469 IN gctINT BitsPerPixel, 480 IN gctINT BitsPerPixel,
470 IN gctPOINTER Bits 481 IN gctPOINTER Bits
471 ); 482 );
472 483
473 gceSTATUS 484 gceSTATUS
474 gcoOS_DestroyPixmap( 485 gcoOS_DestroyPixmap(
475 IN HALNativeDisplayType Display, 486 IN HALNativeDisplayType Display,
476 IN HALNativePixmapType Pixmap 487 IN HALNativePixmapType Pixmap
477 ); 488 );
478 489
479 gceSTATUS 490 gceSTATUS
480 gcoOS_GetPixmapInfoEx( 491 gcoOS_GetPixmapInfoEx(
481 IN HALNativeDisplayType Display, 492 IN HALNativeDisplayType Display,
482 IN HALNativePixmapType Pixmap, 493 IN HALNativePixmapType Pixmap,
483 OUT gctINT * Width, 494 OUT gctINT * Width,
484 OUT gctINT * Height, 495 OUT gctINT * Height,
485 OUT gctINT * BitsPerPixel, 496 OUT gctINT * BitsPerPixel,
486 OUT gctINT * Stride, 497 OUT gctINT * Stride,
487 OUT gctPOINTER * Bits, 498 OUT gctPOINTER * Bits,
488 OUT gceSURF_FORMAT * Format 499 OUT gceSURF_FORMAT * Format
489 ); 500 );
490 501
491 gceSTATUS 502 gceSTATUS
492 gcoOS_CopyPixmapBits( 503 gcoOS_CopyPixmapBits(
493 IN HALNativeDisplayType Display, 504 IN HALNativeDisplayType Display,
494 IN HALNativePixmapType Pixmap, 505 IN HALNativePixmapType Pixmap,
495 IN gctUINT DstWidth, 506 IN gctUINT DstWidth,
496 IN gctUINT DstHeight, 507 IN gctUINT DstHeight,
497 IN gctINT DstStride, 508 IN gctINT DstStride,
498 IN gceSURF_FORMAT DstFormat, 509 IN gceSURF_FORMAT DstFormat,
499 OUT gctPOINTER DstBits 510 OUT gctPOINTER DstBits
500 ); 511 );
501 512
502 /******************************************************************************* 513 /*******************************************************************************
503 ** OS relative. **************************************************************** 514 ** OS relative. ****************************************************************
504 */ 515 */
505 gceSTATUS 516 gceSTATUS
506 gcoOS_LoadEGLLibrary( 517 gcoOS_LoadEGLLibrary(
507 OUT gctHANDLE * Handle 518 OUT gctHANDLE * Handle
508 ); 519 );
509 520
510 gceSTATUS 521 gceSTATUS
511 gcoOS_FreeEGLLibrary( 522 gcoOS_FreeEGLLibrary(
512 IN gctHANDLE Handle 523 IN gctHANDLE Handle
513 ); 524 );
514 525
515 gceSTATUS 526 gceSTATUS
516 gcoOS_ShowWindow( 527 gcoOS_ShowWindow(
517 IN HALNativeDisplayType Display, 528 IN HALNativeDisplayType Display,
518 IN HALNativeWindowType Window 529 IN HALNativeWindowType Window
519 ); 530 );
520 531
521 gceSTATUS 532 gceSTATUS
522 gcoOS_HideWindow( 533 gcoOS_HideWindow(
523 IN HALNativeDisplayType Display, 534 IN HALNativeDisplayType Display,
524 IN HALNativeWindowType Window 535 IN HALNativeWindowType Window
525 ); 536 );
526 537
527 gceSTATUS 538 gceSTATUS
528 gcoOS_SetWindowTitle( 539 gcoOS_SetWindowTitle(
529 IN HALNativeDisplayType Display, 540 IN HALNativeDisplayType Display,
530 IN HALNativeWindowType Window, 541 IN HALNativeWindowType Window,
531 IN gctCONST_STRING Title 542 IN gctCONST_STRING Title
532 ); 543 );
533 544
534 gceSTATUS 545 gceSTATUS
535 gcoOS_CapturePointer( 546 gcoOS_CapturePointer(
536 IN HALNativeDisplayType Display, 547 IN HALNativeDisplayType Display,
537 IN HALNativeWindowType Window 548 IN HALNativeWindowType Window
538 ); 549 );
539 550
540 gceSTATUS 551 gceSTATUS
541 gcoOS_GetEvent( 552 gcoOS_GetEvent(
542 IN HALNativeDisplayType Display, 553 IN HALNativeDisplayType Display,
543 IN HALNativeWindowType Window, 554 IN HALNativeWindowType Window,
544 OUT halEvent * Event 555 OUT halEvent * Event
545 ); 556 );
546 557
547 gceSTATUS 558 gceSTATUS
548 gcoOS_CreateClientBuffer( 559 gcoOS_CreateClientBuffer(
549 IN gctINT Width, 560 IN gctINT Width,
550 IN gctINT Height, 561 IN gctINT Height,
551 IN gctINT Format, 562 IN gctINT Format,
552 IN gctINT Type, 563 IN gctINT Type,
553 OUT gctPOINTER * ClientBuffer 564 OUT gctPOINTER * ClientBuffer
554 ); 565 );
555 566
556 gceSTATUS 567 gceSTATUS
557 gcoOS_GetClientBufferInfo( 568 gcoOS_GetClientBufferInfo(
558 IN gctPOINTER ClientBuffer, 569 IN gctPOINTER ClientBuffer,
559 OUT gctINT * Width, 570 OUT gctINT * Width,
560 OUT gctINT * Height, 571 OUT gctINT * Height,
561 OUT gctINT * Stride, 572 OUT gctINT * Stride,
562 OUT gctPOINTER * Bits 573 OUT gctPOINTER * Bits
563 ); 574 );
564 575
565 gceSTATUS 576 gceSTATUS
566 gcoOS_DestroyClientBuffer( 577 gcoOS_DestroyClientBuffer(
567 IN gctPOINTER ClientBuffer 578 IN gctPOINTER ClientBuffer
568 ); 579 );
569 580
570 gceSTATUS 581 gceSTATUS
571 gcoOS_DestroyContext( 582 gcoOS_DestroyContext(
572 IN gctPOINTER Display, 583 IN gctPOINTER Display,
573 IN gctPOINTER Context 584 IN gctPOINTER Context
574 ); 585 );
575 586
576 gceSTATUS 587 gceSTATUS
577 gcoOS_CreateContext( 588 gcoOS_CreateContext(
578 IN gctPOINTER LocalDisplay, 589 IN gctPOINTER LocalDisplay,
579 IN gctPOINTER Context 590 IN gctPOINTER Context
580 ); 591 );
581 592
582 gceSTATUS 593 gceSTATUS
583 gcoOS_MakeCurrent( 594 gcoOS_MakeCurrent(
584 IN gctPOINTER LocalDisplay, 595 IN gctPOINTER LocalDisplay,
585 IN HALNativeWindowType DrawDrawable, 596 IN HALNativeWindowType DrawDrawable,
586 IN HALNativeWindowType ReadDrawable, 597 IN HALNativeWindowType ReadDrawable,
587 IN gctPOINTER Context, 598 IN gctPOINTER Context,
588 IN gcoSURF ResolveTarget 599 IN gcoSURF ResolveTarget
589 ); 600 );
590 601
591 gceSTATUS 602 gceSTATUS
592 gcoOS_CreateDrawable( 603 gcoOS_CreateDrawable(
593 IN gctPOINTER LocalDisplay, 604 IN gctPOINTER LocalDisplay,
594 IN HALNativeWindowType Drawable 605 IN HALNativeWindowType Drawable
595 ); 606 );
596 607
597 gceSTATUS 608 gceSTATUS
598 gcoOS_DestroyDrawable( 609 gcoOS_DestroyDrawable(
599 IN gctPOINTER LocalDisplay, 610 IN gctPOINTER LocalDisplay,
600 IN HALNativeWindowType Drawable 611 IN HALNativeWindowType Drawable
601 ); 612 );
602 gceSTATUS 613 gceSTATUS
603 gcoOS_SwapBuffers( 614 gcoOS_SwapBuffers(
604 IN gctPOINTER LocalDisplay, 615 IN gctPOINTER LocalDisplay,
605 IN HALNativeWindowType Drawable, 616 IN HALNativeWindowType Drawable,
606 IN gcoSURF RenderTarget, 617 IN gcoSURF RenderTarget,
607 IN gcoSURF ResolveTarget, 618 IN gcoSURF ResolveTarget,
608 IN gctPOINTER ResolveBits, 619 IN gctPOINTER ResolveBits,
609 OUT gctUINT *Width, 620 OUT gctUINT *Width,
610 OUT gctUINT *Height 621 OUT gctUINT *Height
611 ); 622 );
612 #ifdef __cplusplus 623 #ifdef __cplusplus
613 } 624 }
614 #endif 625 #endif
615 626
616 #endif /* __gc_hal_eglplatform_h_ */ 627 #endif /* __gc_hal_eglplatform_h_ */
617 628