Commits on Source (25)
-
Daniel Stone authored
No-one should be implementing an external renderer, so move the interface out of the public header. Signed-off-by: Daniel Stone <daniels@collabora.com>
0c65b238 -
Daniel Stone authored
gl_surface_state has a bunch of members which are tied to the input buffer, rather than the surface per se. Split them out into a separate gl_buffer_state member as a first step towards sanitising its use and lifetime. Signed-off-by: Daniel Stone <daniels@collabora.com>
72fc647a -
Daniel Stone authored
No functional change. Signed-off-by: Daniel Stone <daniels@collabora.com>
8f567435 -
Daniel Stone authored
Makes it more consistent with the others, and also easier to return success/fail. Signed-off-by: Daniel Stone <daniels@collabora.com>
45194614 -
Daniel Stone authored
This only happens for the legacy renderer, but still, might as well clean up after ourselves when we can't import a secondary plane. Signed-off-by: Daniel Stone <daniels@collabora.com>
bb624754 -
Daniel Stone authored
It's good to know if we succeeded or failed to import our buffers. This will also later make for a more smooth transition when we start returning a gl_buffer_state from them. Signed-off-by: Daniel Stone <daniels@collabora.com>
428ae215 -
Daniel Stone authored
Deduplicate the no-buffer and the import-fail case, and try to fall through where we can. This will make it easier to shift the buffer reference change later, so the attach subhandlers can reference the old buffer when checking for compatibility. Signed-off-by: Daniel Stone <daniels@collabora.com>
0cdf576c -
Daniel Stone authored
The handlers can chase the details of the buffers themselves. Signed-off-by: Daniel Stone <daniels@collabora.com>
77e1a042 -
Daniel Stone authored
Allow the various attach handlers to access the existing buffer, only referencing the new buffer when they have successfully attached. Signed-off-by: Daniel Stone <daniels@collabora.com>
1a65c1b8 -
Daniel Stone authored
If we can reuse the textures we already have, just return early, rather than putting all the work in a large indented body. Signed-off-by: Daniel Stone <daniels@collabora.com>
70874428 -
Daniel Stone authored
Low-hanging fruit: just get this from the weston_buffer. Signed-off-by: Daniel Stone <daniels@collabora.com>
c6af9c85 -
Daniel Stone authored
It's just a shadow of weston_buffer.buffer_origin, which also has a slightly more descriptive name. Signed-off-by: Daniel Stone <daniels@collabora.com>
90dbf452 -
Daniel Stone authored
Signed-off-by: Daniel Stone <daniels@collabora.com>
907c9d1f -
Daniel Stone authored
This was only used for what was presumably an attempt at an optimisation, to force the texture's pitch in pixels to match the SHM buffer. This is really unlikely to have ever made a difference, given the alignments GPUs demand. Signed-off-by: Daniel Stone <daniels@collabora.com>
5fdb5fdd -
Daniel Stone authored
We can just get this from the weston_buffer. Signed-off-by: Daniel Stone <daniels@collabora.com>
21c65d7c -
Daniel Stone authored
Now that we can reliably access buffer dimensions from weston_buffer, and gl-renderer isn't doing strange things with buffer widths, just use that. The renderer interface is now unused and can be deleted. Signed-off-by: Daniel Stone <daniels@collabora.com>
193de3c2 -
Daniel Stone authored
No need for the renderers to do this now that we know what all of the formats are. Signed-off-by: Daniel Stone <daniels@collabora.com>
c9253c00 -
Daniel Stone authored
At the moment, attach_shm() will modify the gl_buffer_state in place, then compare it and see if it differs enough to require a new one. That rather mixes up the old and new worlds, so quite explicitly build up a shadow gl_buffer_state with variables first before we change the one which already exists. Signed-off-by: Daniel Stone <daniels@collabora.com>
57c34139 -
Daniel Stone authored
Just make it a generic buffer attribute, not hidden away in GL. Signed-off-by: Daniel Stone <daniels@collabora.com>
8544a4d0 -
Daniel Stone authored
Introduce a renderer_private hook for weston_buffer, and use this to store a copy of the gl_buffer_state for EGL buffers (i.e. non-dmabuf, via EGL_WL_bind_wayland_display). As part of this, we create the EGLImage along with the weston_buffer information, and just take a reference to it each time it is attached. If you have bisected a failure to update surface content to this commit, it very likely means that your EGL implementation requires images to be recreated rather than only rebound in order to have their content updated, which is contrary to specification. Signed-off-by: Daniel Stone <daniels@collabora.com>
8b167a17 -
Daniel Stone authored
We don't need this now we don't try to reimport them on attach. Signed-off-by: Daniel Stone <daniels@collabora.com>
56dc4b8a -
Daniel Stone authored
Similarly to EGL buffers, store the gl_buffer_state for a dmabuf buffer inside weston_buffer, rather than on the linux_dmabuf_buffer. This slightly simplifies our gl_buffer_state handling, and will be used later to eliminate the egl_image refcounting. Signed-off-by: Daniel Stone <daniels@collabora.com>
acc37625 -
Daniel Stone authored
... apart from SHM. EGL and dmabuf buffers already have a gl_buffer_state created for them when we first attach the weston_buffer. By turning gl_surface_state::buffer into a pointer, we can just reference rather than inline the gl_buffer_state. SHM buffers are special, in that we don't keep individual copies of them within the GL renderer. Instead, the GL surface has a texture allocated with a shadow copy of the most up-to-date surface content. Handle this by allocating and destroying gl_buffer_state every time we need to respecify textures or somehow meaningfully change the parameters. Signed-off-by: Daniel Stone <daniels@collabora.com>
3297d102 -
Daniel Stone authored
Now that EGLImages are strongly associated with a gl_buffer_state, which has a lifetime strictly bounded by a weston_buffer, we don't need to have an egl_image wrapper having its own separate refcounting anymore. Signed-off-by: Daniel Stone <daniels@collabora.com>
62c0f162 -
Daniel Stone authored
Now that the gl_buffer_state owns everything related to buffers, move the textures from there rather than living on the surface, to join the EGLImage and/or SHM params. Signed-off-by: Daniel Stone <daniels@collabora.com>
48159366
This diff is collapsed.