aboutsummaryrefslogtreecommitdiff
path: root/render/pixman/renderer.c
AgeCommit message (Collapse)Author
2023-07-11render: constify struct wlr_buffer_pass_optionsSimon Ser
Let's not allow renderer implementations to mutate the passed in options.
2023-07-11Use wl_container_of() instead of castsSimon Ser
This slightly improves type safety. The culprits were found with: git grep -E '\([a-z0-9_ ]+ \*\)\W?[a-z]'
2023-06-19pixman: Remove dead codeAlexander Orzechowski
2023-06-05add render timer APIRose Hudson
Based on five calls: wlr_render_timer_create - creates a timer which can be reused across frames on the same renderer wlr_renderer_begin_buffer_pass - now takes a timer so that backends can record when the rendering starts and finishes wlr_render_timer_get_time - should be called as late as possible so that queries can make their way back from the GPU wlr_render_timer_destroy - self-explanatory The timer is exposed as an opaque `struct wlr_render_timer` so that backends can store whatever they want in there.
2023-04-25render/pixman: implement render pass APISimon Ser
2023-04-25render/pixman: add begin_pixman_data_ptr_access()Simon Ser
This logic is used twice.
2022-12-08render/pixman: skip mask for opaque texture renderingSimon Ser
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