implement window surface

Adam Jackson ajax at nwnk.net
Wed May 18 13:13:06 PDT 2005


On Wednesday 18 May 2005 15:54, Jon Smirl wrote:
> On 5/18/05, Adam Jackson <ajax at nwnk.net> wrote:
> > In that case you'll want to migrate the buffer contents out of card
> > memory anyway, won't you?  I'm not opposed to short-circuiting the
> > rendering path in that case, but you still need a way to create the
> > Window handle that you feed to CreateWindowSurface.
>
> Do you have to have a native window handle if the surface has x/y
> offset parameters? This is assuming that damage is tracked at a higher
> level. A window could have a full, accelerated back buffer and then be
> copied into a clipped screen rectangle on swapbuffer. You just need to
> track the window offset.

If you want an EGL Window surface to track this object, then yes you need a 
handle:

EGLSurface eglCreateWindowSurface(EGLDisplay display,
                                  EGLConfig config,
                                  NativeWindowType native_window,
                                  EGLint const *attrib_list);

You can not use any magic value for native_window because any value is a 
potentially legitimate XID (excluding zero I suppose, but you'd want more 
than one such surface).  It's a bit of a wart in the spec, really 
eglCreateWindowSurface should create the thing for you behind the scenes, as 
it stands EGL programs need lots of #ifdef magic if they want to run on 
multiple window systems.

If you don't care about calling it a Window surface, then you don't need a 
handle:

EGLSurface eglCreateFunkySurfaceMESA(EGLDisplay display,
                                     EGLConfig config,
                                     EGLint const *attrib_list);

This is pure optimization though.  We might want a "window" surface when 
running standalone, but we don't strictly need one.   I'd worry about it 
later.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dri-egl/attachments/20050518/4a50ebcf/attachment.pgp


More information about the dri-egl mailing list