Wayland Programming.

Pekka Paalanen ppaalanen at gmail.com
Thu Oct 15 00:15:03 PDT 2015


On Wed, 14 Oct 2015 13:20:30 -0700
<admin at ragmail.ca> wrote:

> 
> I was looking at your blog.
> 
> Some people are claiming that you have to create a wl_buffer before a
> wl_surface.
> Some people are claiming that you don't have to create a wl_buffer at
> all.
> 
> Do you know what's going on?
> 
> How do you create a wl_surface?
> 

Hi,

first, let's put this on the proper mailing list for everyone's benefit.

You create a wl_surface with the wl_compositor.create_surface request.
That is all. Only the wl_compositor is required, nothing else.

Of course, such a wl_surface will be useless until you do two more
things:
- give it a role
- give it content (create a wl_buffer, fill it with data, and
  wl_surface.damage+attach+commit it)
Only after these you may see something on the screen.

Refer to
http://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface
for how to do things after you created a wl_surface.

There is no difference in which you create first, a wl_surface or a
wl_buffer.

There are different kinds of wl_buffers created in different ways,
because of different ways to associate data with them: drawing with the
CPU, rendering with the GPU, hardware-decoded video...


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151015/4111c901/attachment.sig>


More information about the wayland-devel mailing list