aboutsummaryrefslogtreecommitdiff
path: root/render/pixman/renderer.c
AgeCommit message (Collapse)Author
2022-12-01wlr_texture: Expose owning rendererAlexander Orzechowski
2022-11-15render: allow wlr_renderer_impl.begin to failSimon Ser
Make it return a bool to indicate success/failure. Adapt the various implementations to check errors.
2022-11-08Revert "render/pixman: apply source image cropping"Kirill Primak
This reverts commit 9fefeb69d6fc1136cfad7d690e1d7385c058fd72. It doesn't really crop anything, actually.
2022-11-08render/pixman: apply source image croppingKirill Primak
2022-10-04render: drop wlr_renderer_read_pixels() flagsSimon Ser
These are unused.
2022-10-01render/pixman: advertise support for linear format modifierSimon Ser
When running with the DRM backend, the Pixman renderer needs to render the cursor buffer. However, DRM drivers only support linear buffers for these in general, they don't support implicit modifiers (aka. INVALID). Advertise support for LINEAR in the Pixman renderer to fix this.
2022-06-16render/texture: drop wlr_texture_is_opaqueSimon Ser
Whether a texture is opaque or not doesn't depend on the renderer at all, it just depends on the source buffer. Instead of forcing all renderers to implement wlr_texture_impl.is_opaque, let's move this in common code and use the wlr_buffer format to know whether a texture will be opaque.
2021-12-02render/pixman: advertise MOD_INVALID instead of MOD_LINEARSimon Ser
The backends and allocators use INVALID, but the renderer uses LINEAR. Running a compositor with WLR_RENDERER=pixman results in: 00:00:00.744 [types/output/render.c:59] Failed to pick primary buffer format for output 'WL-1'
2021-10-27render/pixman/renderer.c: Fix memory-leak in create_bufferHaelwenn (lanodan) Monnier
Found via scan-build
2021-09-15types/buffer: make {begin,end}_data_ptr_access part of the public APISimon Zeni
2021-09-10buffer: add data_ptr access flagsSimon Ser
This allows callers to specify the operations they'll perform on the returned data pointer. The motivations for this are: - The upcoming Linux MAP_NOSIGBUS flag may only be usable on read-only mappings. - gbm_bo_map with GBM_BO_TRANSFER_READ hurts performance.
2021-07-09render/pixman: fix texture_is_opaque()Vyivel
A texture is opaque when it does *not* have alpha. Fixes https://github.com/swaywm/wlroots/issues/2907
2021-07-06move wlr_box from /types to /utilSimon Zeni
2021-07-01render: drop wlr_renderer_impl.texture_from_pixelsSimon Ser
2021-06-19render: add get native paint target of rendererzccrs
Add wlr_pixman_buffer_get_current_image for wlr_pixman_renderer. Add wlr_gles2_buffer_get_current_fbo for wlr_gles2_renderer. Allow get the FBO/pixman_image_t, the compositor can be add some action for FBO(for eg, attach a depth buffer), or without pixman render to pixman_image_t(for eg, use QPainter of Qt instead of pixman).
2021-06-19render/pixman: add wlr_*_is_pixman and wlr_pixman_texture_get_imagezccrs
Add the following functions: - wlr_renderer_is_pixman - wlr_texture_is_pixman - wlr_pixman_texture_get_image
2021-06-09render: add missing arg to wlr_renderer_impl.get_buffer_capsSimon Ser
The types of buffers supported by the renderer might depend on the renderer's instance. For instance, a renderer might only support DMA-BUFs if the necessary EGL extensions are available. Pass the wlr_renderer to get_buffer_caps so that the renderer can perform such checks. Fixes: 982498fab3c4 ("render: introduce renderer_get_render_buffer_caps")
2021-06-07render/pixman: implement texture_from_bufferSimon Ser
2021-06-07buffer: replace get_data_ptr with {begin,end}_data_ptr_accessSimon Ser
This new API allows buffer implementations to know when a user is actively accessing the buffer's underlying storage. This is important for the upcoming client-backed wlr_buffer implementation.
2021-05-19render/pixman: avoid sqrt() in render_quad without rotationSimon Ser
When the matrix doesn't have a rotation, we can avoid a sqrt() call. Tested with Sway's tabbed containers.
2021-04-28render: introduce renderer_get_render_buffer_capsSimon Zeni
2021-04-27render/pixman: check format is supported in create_bufferSimon Ser
2021-04-27buffer: add format param to get_data_ptrSimon Ser
Allow wlr_buffer_impl.get_data_ptr to return a format. This allows the Pixman renderer to not care about get_dmabuf/get_shm, and only care about get_data_ptr. This will also help with [1], because client wl_shm buffers can't implement get_shm. [1]: https://github.com/swaywm/wlroots/pull/2892 References: https://github.com/swaywm/wlroots/issues/2864
2021-04-27pixman: implement read pixelsSimon Zeni
2021-04-27render/pixman: implement preferred_read_formatSimon Zeni
2021-04-22render: remove NULL checks in wlr_texture_impl.destroySimon Ser
The NULL check already exists in wlr_texture_destroy, no need to duplicate it in each impl
2021-04-22render/pixman: destroy textures on renderer teardownSimon Ser
2021-04-22render/pixman: cleanup when renderer is destroyedSimon Ser
We were leaking wlr_pixman_buffers and a wlr_drm_format_set.
2021-04-17render: introduce pixman rendererSimon Zeni