labwc/src
John Lindgren d2b161bdf8 buffer: reduce unnecessary painting to new cairo surfaces
Add buffer_adopt_cairo_surface(), which allows wrapping an existing
cairo image surface in a struct lab_data_buffer. This is useful when
loading PNGs since most will be loaded as ARGB32 already.

Fix a memory leak in the non-ARGB32 PNG case, where we do still need to
paint to a new image surface -- we were leaking the original surface.

Eliminate an unnecessary temporary image surface in SVG loading and just
render the SVG to the image surface held by the lab_data_buffer.

I also cleaned up and clarified the buffer API a bit:

- Add a pointer to the held cairo_surface_t (so we can still access it
  if there is no cairo_t).
- Remove the free_on_destroy bool (it was always true).
- Rename unscaled_width/height to logical_width/height and add an
  explanatory comment. It was unclear what "unscaled" meant.
- Rename buffer_create_wrap() to buffer_create_from_data().

This is laying groundwork for some more icon fixes I am working on
(making sure icons are loaded and rendered at the correct scale).
2024-10-06 16:51:14 +01:00
..
common buffer: reduce unnecessary painting to new cairo surfaces 2024-10-06 16:51:14 +01:00
config Add labwc to XDG_CURRENT_DESKTOP to support a portals.conf (#1716) 2024-10-01 21:33:45 +01:00
decorations chase: request initial configure 2024-07-17 21:28:59 +01:00
img buffer: reduce unnecessary painting to new cairo surfaces 2024-10-06 16:51:14 +01:00
input cursor: prevent Drag mousebinds from running without button press 2024-10-01 21:26:19 +01:00
menu cosmic-workspaces: fix menu.c 2024-10-01 21:45:13 +01:00
protocols cosmic-workspaces: protocol implementation 2024-08-03 18:25:23 +02:00
ssd buffer: reduce unnecessary painting to new cairo surfaces 2024-10-06 16:51:14 +01:00
action.c xdg: fix crash on actions from menu opened by show_window_menu requests 2024-10-05 07:40:09 +09:00
buffer.c buffer: reduce unnecessary painting to new cairo surfaces 2024-10-06 16:51:14 +01:00
debug.c workspaces: slight struct reordering 2024-08-02 19:35:36 +02:00
desktop.c Merge pull request #2030 from Consolatis/wip/cosmic_workspaces 2024-10-01 21:31:04 +01:00
dnd.c dnd: show dnd icon above layer-shell surfaces 2024-06-25 14:56:57 +02:00
edges.c edges.c: fix flicker of snapped windows in nested session 2024-07-20 08:16:12 -04:00
foreign.c osd: prevent handling cursor actions in preview mode 2024-05-05 21:05:32 +01:00
icon-loader.c icon-loader: fix a few more missing icons 2024-10-05 21:01:55 +01:00
idle.c Chase wlroots: drop KDE idle protocol 2023-11-27 21:01:53 +00:00
interactive.c Revert "src/interactive.c: don't unshade when view is un-tiled by dragging" 2024-08-28 08:24:26 -04:00
layers.c layer-shell: stop sending configure events on surface creation 2024-07-23 14:47:56 +02:00
magnifier.c backend/drm: Implement support for renderer loss recovery 2024-07-23 14:44:31 +02:00
main.c src/main.c: initialize locale after reading environments file 2024-06-23 01:02:03 +02:00
meson.build Merge pull request #2030 from Consolatis/wip/cosmic_workspaces 2024-10-01 21:31:04 +01:00
node.c common: Add znew/znew_n() macros 2022-09-18 15:25:19 -04:00
osd-field.c Replace _ with - in source file names 2024-05-22 07:10:51 +01:00
osd.c buffer: reduce unnecessary painting to new cairo surfaces 2024-10-06 16:51:14 +01:00
output-state.c chase: output->pending 2024-07-17 21:28:59 +01:00
output-virtual.c Fix various typos across the codebase 2024-03-08 13:59:20 +01:00
output.c Merge pull request #2030 from Consolatis/wip/cosmic_workspaces 2024-10-01 21:31:04 +01:00
overlay.c overlay: allow to draw both/either of filled/outlined rectangle 2024-04-22 19:22:23 +01:00
placement.c Fix various typos across the codebase 2024-03-08 13:59:20 +01:00
regions.c interactive: allow moving horizontally/vertically maximized window 2024-08-26 20:30:22 +02:00
resistance.c interactive: allow moving horizontally/vertically maximized window 2024-08-26 20:30:22 +02:00
resize-outlines.c Implement <resize><drawContents> 2024-06-15 21:17:01 +01:00
seat.c Refactor the logic of placing client-menu with ShowMenu action 2024-09-21 18:07:34 +01:00
server.c ssd: support window icons 2024-09-25 18:04:09 +09:00
session-lock.c session-lock: clear focused surface on lock 2024-07-07 15:48:32 +09:00
snap-constraints.c snap: cache and ignore last-snapped edge when growing or shrinking 2024-04-10 23:30:28 +01:00
snap.c theme: add button padding and spacing (#2127) 2024-09-10 22:14:30 +01:00
tearing.c tearing: add fullscreen options (#1941) 2024-08-06 21:23:10 +01:00
theme.c buffer: reduce unnecessary painting to new cairo surfaces 2024-10-06 16:51:14 +01:00
view-impl-common.c view: update top layer visibility on map 2024-04-29 14:39:05 +02:00
view.c Merge pull request #2030 from Consolatis/wip/cosmic_workspaces 2024-10-01 21:31:04 +01:00
window-rules.c Refactor the logic of placing client-menu with ShowMenu action 2024-09-21 18:07:34 +01:00
workspaces.c buffer: reduce unnecessary painting to new cairo surfaces 2024-10-06 16:51:14 +01:00
xdg-popup.c src/xdg-popup.c: take into account CSD borders for unconstraining 2024-07-23 14:53:33 +02:00
xdg.c xdg: fix crash on actions from menu opened by show_window_menu requests 2024-10-05 07:40:09 +09:00
xwayland-unmanaged.c chase: disable restacking of unmanaged windows 2024-07-17 21:28:59 +01:00
xwayland.c icon-loader: fix a few more missing icons 2024-10-05 21:01:55 +01:00