From 24cf70ae9691d605e4a1f7e9d8dc59ec72401bd0 Mon Sep 17 00:00:00 2001
From: Ilia Bozhinov <ammen99@gmail.com>
Date: Fri, 25 May 2018 13:14:35 +0300
Subject: backends: implement custom EGL and renderer initialization

Compositors now have more control over how the backend creates its
renderer. Currently all backends create an EGL/GLES2 renderer, so
the necessary attributes for creating the context are passed to a
user-provided callback function. It is responsible for initializing
provided wlr_egl and to return a renderer. On fail, return 0.

Fixes #987
---
 examples/multi-pointer.c | 2 +-
 examples/output-layout.c | 2 +-
 examples/pointer.c       | 2 +-
 examples/rotation.c      | 2 +-
 examples/simple.c        | 2 +-
 examples/tablet.c        | 2 +-
 examples/touch.c         | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

(limited to 'examples')

diff --git a/examples/multi-pointer.c b/examples/multi-pointer.c
index 83ee253d..c5b2048f 100644
--- a/examples/multi-pointer.c
+++ b/examples/multi-pointer.c
@@ -284,7 +284,7 @@ int main(int argc, char *argv[]) {
 		.clear_color = { 0.25f, 0.25f, 0.25f, 1 },
 		.display = display,
 	};
-	struct wlr_backend *wlr = wlr_backend_autocreate(display);
+	struct wlr_backend *wlr = wlr_backend_autocreate(display, NULL);
 	if (!wlr) {
 		exit(1);
 	}
diff --git a/examples/output-layout.c b/examples/output-layout.c
index d45100b6..7b847a3b 100644
--- a/examples/output-layout.c
+++ b/examples/output-layout.c
@@ -261,7 +261,7 @@ int main(int argc, char *argv[]) {
 	state.layout = wlr_output_layout_create();
 	clock_gettime(CLOCK_MONOTONIC, &state.ts_last);
 
-	struct wlr_backend *wlr = wlr_backend_autocreate(display);
+	struct wlr_backend *wlr = wlr_backend_autocreate(display, NULL);
 	if (!wlr) {
 		exit(1);
 	}
diff --git a/examples/pointer.c b/examples/pointer.c
index 8dba99eb..d6b4ed1c 100644
--- a/examples/pointer.c
+++ b/examples/pointer.c
@@ -324,7 +324,7 @@ int main(int argc, char *argv[]) {
 		.display = display
 	};
 
-	struct wlr_backend *wlr = wlr_backend_autocreate(display);
+	struct wlr_backend *wlr = wlr_backend_autocreate(display, NULL);
 	if (!wlr) {
 		exit(1);
 	}
diff --git a/examples/rotation.c b/examples/rotation.c
index 0ee9964c..bd39a21e 100644
--- a/examples/rotation.c
+++ b/examples/rotation.c
@@ -235,7 +235,7 @@ int main(int argc, char *argv[]) {
 	};
 	wl_list_init(&state.outputs);
 
-	struct wlr_backend *wlr = wlr_backend_autocreate(display);
+	struct wlr_backend *wlr = wlr_backend_autocreate(display, NULL);
 	if (!wlr) {
 		exit(1);
 	}
diff --git a/examples/simple.c b/examples/simple.c
index e64289fb..60acd7db 100644
--- a/examples/simple.c
+++ b/examples/simple.c
@@ -152,7 +152,7 @@ int main() {
 		.last_frame = { 0 },
 		.display = display
 	};
-	struct wlr_backend *wlr = wlr_backend_autocreate(display);
+	struct wlr_backend *wlr = wlr_backend_autocreate(display, NULL);
 	if (!wlr) {
 		exit(1);
 	}
diff --git a/examples/tablet.c b/examples/tablet.c
index d178f2ef..f5c4bbb5 100644
--- a/examples/tablet.c
+++ b/examples/tablet.c
@@ -349,7 +349,7 @@ int main(int argc, char *argv[]) {
 	};
 	wl_list_init(&state.tablet_pads);
 	wl_list_init(&state.tablet_tools);
-	struct wlr_backend *wlr = wlr_backend_autocreate(display);
+	struct wlr_backend *wlr = wlr_backend_autocreate(display, NULL);
 	if (!wlr) {
 		exit(1);
 	}
diff --git a/examples/touch.c b/examples/touch.c
index 069fda74..68f78a0a 100644
--- a/examples/touch.c
+++ b/examples/touch.c
@@ -244,7 +244,7 @@ int main(int argc, char *argv[]) {
 	wl_list_init(&state.touch_points);
 	wl_list_init(&state.touch);
 
-	struct wlr_backend *wlr = wlr_backend_autocreate(display);
+	struct wlr_backend *wlr = wlr_backend_autocreate(display, NULL);
 	if (!wlr) {
 		exit(1);
 	}
-- 
cgit v1.2.3