~sircmpwn/wio

Changed pixel formats from WLR_SHM to DRM v1 PROPOSED

Robert Miller: 1
 Changed pixel formats from WLR_SHM to DRM

 1 files changed, 6 insertions(+), 5 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/wio/patches/22364/mbox | git am -3
Learn more about email & git

[PATCH] Changed pixel formats from WLR_SHM to DRM Export this patch

---
 main.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/main.c b/main.c
index 5d7dcda..d832641 100644
--- a/main.c
+++ b/main.c
@@ -14,7 +14,7 @@
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_export_dmabuf_v1.h>
#include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_gtk_primary_selection.h>
// #include <wlr/types/wlr_gtk_primary_selection.h>
#include <wlr/types/wlr_layer_shell_v1.h>
#include <wlr/types/wlr_primary_selection_v1.h>
#include <wlr/types/wlr_screencopy_v1.h>
@@ -23,6 +23,7 @@
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/types/wlr_xdg_output_v1.h>
#include <wlr/util/log.h>
#include <drm_fourcc.h>
#include "layers.h"
#include "server.h"
#include "view.h"
@@ -49,7 +50,7 @@ static void gen_menu_textures(struct wio_server *server) {
		cairo_surface_flush(surf);
		unsigned char *data = cairo_image_surface_get_data(surf);
		server->menu.inactive_textures[i] = wlr_texture_from_pixels(renderer,
				WL_SHM_FORMAT_ARGB8888,
				DRM_FORMAT_ARGB8888,
				cairo_image_surface_get_stride(surf),
				extents.width + 2, extents.height + 2, data);
	}
@@ -66,7 +67,7 @@ static void gen_menu_textures(struct wio_server *server) {
		cairo_surface_flush(surf);
		unsigned char *data = cairo_image_surface_get_data(surf);
		server->menu.active_textures[i] = wlr_texture_from_pixels(renderer,
				WL_SHM_FORMAT_ARGB8888,
				DRM_FORMAT_ARGB8888,
				cairo_image_surface_get_stride(surf),
				extents.width + 2, extents.height + 2, data);
	}
@@ -152,7 +153,7 @@ int main(int argc, char **argv) {
	}

	server.wl_display = wl_display_create();
	server.backend = wlr_backend_autocreate(server.wl_display, NULL);
	server.backend = wlr_backend_autocreate(server.wl_display);
	server.renderer = wlr_backend_get_renderer(server.backend);
	wlr_renderer_init_wl_display(server.renderer, server.wl_display);

@@ -165,7 +166,7 @@ int main(int argc, char **argv) {
	wlr_primary_selection_v1_device_manager_create(server.wl_display);

	wlr_gamma_control_manager_v1_create(server.wl_display);
	wlr_gtk_primary_selection_device_manager_create(server.wl_display);
//	wlr_gtk_primary_selection_device_manager_create(server.wl_display);

	wl_list_init(&server.outputs);
	server.new_output.notify = server_new_output;
-- 
2.31.1