Commits on Source (13)
-
Michael Tretter authored
Move the dep_gbm from the backend-drm specific meson.build to the common libweston meson.build to be able to use it in other modules, too. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
9b65a706 -
Michael Tretter authored
Avoid the calculation of the y-flipped coordinates when transforming the pixman region to the vertex coordinates by initializing the projection matrix to already include the y-flip. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
b6075fd0 -
Michael Tretter authored
The GL renderer uses the bottom left corner as origin and several transformations in the renderer assume this corner as origin. Make this assumption explicit by introducing a y_flip variable that is used to calculate transformation that are caused by this origin. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
b57129f4 -
Michael Tretter authored
read_pixels may use the top left or bottom left corner as origin. As the renderer may render the image upside down based on the y_flip variable. read_pixels must read the image with the same origin as used by the renderer to produce a correct image. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
c2dbe171 -
Michael Tretter authored
The GL renderer uses the bottom left corner as origin. Therefore, the buffers must be flipped when using ReadPixels to have a image in the correct orientation for screenshots. If the rendered buffers are directly passed to a different application without going through ReadPixels, the rendered buffer appears upside down. Flip the rendered image in the FBO to fix the orientation when directly using the rendered buffer. Update read_pixels to not flip the image in these cases. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
cc926a45 -
Michael Tretter authored
The renderbuffer list is the reason for keeping a reference for the renderbuffers in the gl-renderer. Add helper functions to make this explicit. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
c9c45490 -
Michael Tretter authored
Support importing dmabuf buffers as renderbuffers and binding them to FBOs. These can then be rendered to directly, or they can be blitted into from the shadow render buffer. How to best create those dmabuf buffers in the backend is an open question and may vary depending on what external API the backend is interfacing with. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
5a779b78 -
Michael Tretter authored
The GL renderer is able to use a gbm_device to allocate gbm_bos, which can be used as DMABUFs. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
14e133e4 -
Michael Tretter authored
If the renderer uses the EGL_PLATFORM_GBM_KHR, the egl_native_display is already a gbm_device and the renderer doesn't have to create another device. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
48152591 -
Michael Tretter authored
The PipeWire backend is only able to render into renderbuffers and passing NULL to the renderer is not valid. Don't try to use the renderbuffer if a buffer without renderbuffer is dequeued from PipeWire. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
073a97a9 -
Michael Tretter authored
Add a helper function for building the pod for the format. This simplifies the creation of the EnumFormat params and to provide multiple EnumFormats. Furthermore, it allows to optionally set add a Modifier to enable DmaBuf negotiation. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
4304468a -
Michael Tretter authored
Instead of letting PipeWire allocate the buffers, allocate them in the PipeWire backend. This allows the PipeWire backend to define the type of the allocated buffers, which will ultimately allow to allocate buffers that can be rendered to. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
fa2f0521 -
Michael Tretter authored
The GL renderer allows the PipeWire backend to allocate DMABUFs that can be used as renderbuffers and passed to PipeWire. This allows to avoid a copy of the rendered output when using PipeWire. PipeWire negotiates DmaBuf buffers using the SPA_FORMAT_VIDEO_modifier property. Currently, the PipeWire-backend only announces and handles DRM_FORMAT_MOD_LINEAR, which allows to share DmaBufs with consumers that have modifier support for linear buffers. Consumers which could consume DmaBufs but don't support modifiers (DRM_FORMAT_MOD_INVALID) are not supported. Moreover, consumers that would benefit from other formats with modifiers, for example tiled or compressed, aren't not supported, too. Modifier negotiation can be added by extending the list of announced modifiers and selecting and checking the proposed modifiers in param_changed. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
ae53d196
This diff is collapsed.