On Thu, 15 Oct 2015 10:15:03 +0300 Pekka Paalanen <ppaala...@gmail.com> wrote:
> On Wed, 14 Oct 2015 13:20:30 -0700 > <ad...@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. Oh, I should add that you may not know what size of a wl_buffer to create until you have created the wl_surface and given it a role. Certain role specific actions trigger the server to tell you what size you should or must use. Thanks, pq
pgpAbEcDFmesY.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel