@@ -87,9 +87,8 @@ static size_t parse_outputs_env(const char *name) {
87
87
return outputs ;
88
88
}
89
89
90
- static struct wlr_backend * attempt_wl_backend (struct wl_display * display ,
91
- wlr_renderer_create_func_t create_renderer_func ) {
92
- struct wlr_backend * backend = wlr_wl_backend_create (display , NULL , create_renderer_func );
B421
tr>
90
+ static struct wlr_backend * attempt_wl_backend (struct wl_display * display ) {
91
+ struct wlr_backend * backend = wlr_wl_backend_create (display , NULL );
93
92
if (backend == NULL ) {
94
93
return NULL ;
95
94
}
@@ -104,8 +103,8 @@ static struct wlr_backend *attempt_wl_backend(struct wl_display *display,
104
103
105
104
#if WLR_HAS_X11_BACKEND
106
105
static struct wlr_backend * attempt_x11_backend (struct wl_display * display ,
107
- const char * x11_display , wlr_renderer_create_func_t create_renderer_func ) {
108
- struct wlr_backend * backend = wlr_x11_backend_create (display , x11_display , create_renderer_func );
106
+ const char * x11_display ) {
107
+ struct wlr_backend * backend = wlr_x11_backend_create (display , x11_display );
109
108
if (backend == NULL ) {
110
109
return NULL ;
111
110
}
@@ -120,8 +119,8 @@ static struct wlr_backend *attempt_x11_backend(struct wl_display *display,
120
119
#endif
121
120
122
121
static struct wlr_backend * attempt_headless_backend (
123
- struct wl_display * display , wlr_renderer_create_func_t create_renderer_func ) {
124
- struct wlr_backend * backend = wlr_headless_backend_create (display , create_renderer_func );
122
+ struct wl_display * display ) {
123
+ struct wlr_backend * backend = wlr_headless_backend_create (display );
125
124
if (backend == NULL ) {
126
125
return NULL ;
127
126
}
@@ -149,16 +148,15 @@ static struct wlr_backend *attempt_noop_backend(struct wl_display *display) {
149
148
}
150
149
151
150
static struct wlr_backend * attempt_drm_backend (struct wl_display * display ,
152
- struct wlr_backend * backend , struct wlr_session * session ,
153
- wlr_renderer_create_func_t create_renderer_func ) {
151
+ struct wlr_backend * backend , struct wlr_session * session ) {
154
152
struct wlr_device * gpus [8 ];
155
153
size_t num_gpus = wlr_session_find_gpus (session , 8 , gpus );
156
154
struct wlr_backend * primary_drm = NULL ;
157
155
wlr_log (WLR_INFO , "Found %zu GPUs" , num_gpus );
158
156
159
157
for (size_t i = 0 ; i < num_gpus ; ++ i ) {
160
158
struct wlr_backend * drm = wlr_drm_backend_create (display , session ,
161
- gpus [i ], primary_drm , create_renderer_func );
159
+ gpus [i ], primary_drm );
162
160
if (!drm ) {
163
161
wlr_log (WLR_ERROR , "Failed to create DRM backend" );
164
162
continue ;
@@ -176,15 +174,15 @@ static struct wlr_backend *attempt_drm_backend(struct wl_display *display,
176
174
177
175
static struct wlr_backend * attempt_backend_by_name (struct wl_display * display ,
178
176
struct wlr_backend * backend , struct wlr_session * * session ,
179
- const char * name , wlr_renderer_create_func_t create_renderer_func ) {
177
+ const char * name ) {
180
178
if (strcmp (name , "wayland" ) == 0 ) {
181
- return attempt_wl_backend (display , create_renderer_func );
179
+ return attempt_wl_backend (display );
182
180
#if WLR_HAS_X11_BACKEND
183
181
} else if (strcmp (name , "x11" ) == 0 ) {
184
- return attempt_x11_backend (display , NULL , create_renderer_func );
182
+ return attempt_x11_backend (display , NULL );
185
183
#endif
186
184
} else if (strcmp (name , "headless" ) == 0 ) {
<
10000
/tr>187
- return attempt_headless_backend (display , create_renderer_func );
185
+ return attempt_headless_backend (display );
188
186
} else if (strcmp (name , "noop" ) == 0 ) {
189
187
return attempt_noop_backend (display );
190
188
} else if (strcmp (name , "drm" ) == 0 || strcmp (name , "libinput" ) == 0 ) {
@@ -200,16 +198,15 @@ static struct wlr_backend *attempt_backend_by_name(struct wl_display *display,
200
198
if (strcmp (name , "libinput" ) == 0 ) {
201
199
return wlr_libinput_backend_create (display , * session );
202
200
} else {
203
- return attempt_drm_backend (display , backend , * session , create_renderer_func );
201
+ return attempt_drm_backend (display , backend , * session );
204
202
}
205
203
}
206
204
207
205
wlr_log (WLR_ERROR , "unrecognized backend '%s'" , name );
208
206
return NULL ;
209
207
}
210
208
211
- struct wlr_backend * wlr_backend_autocreate (struct wl_display * display ,
212
- wlr_renderer_create_func_t create_renderer_func ) {
209
+ struct wlr_backend * wlr_backend_autocreate (struct wl_display * display ) {
213
210
struct wlr_backend * backend = wlr_multi_backend_create (display );
214
211
struct wlr_multi_backend * multi = (struct wlr_multi_backend * )backend ;
215
212
if (!backend ) {
@@ -230,7 +227,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
230
227
char * name = strtok_r (names , "," , & saveptr );
231
228
while (name != NULL ) {
232
229
struct wlr_backend * subbackend = attempt_backend_by_name (display ,
233
- backend , & multi -> session , name , create_renderer_func );
230
+ backend , & multi -> session , name );
234
231
if (subbackend == NULL ) {
235
232
wlr_log (WLR_ERROR , "failed to start backend '%s'" , name );
236
233
wlr_session_destroy (multi -> session );
@@ -255,8 +252,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
255
252
}
256
253
257
254
if (getenv ("WAYLAND_DISPLAY" ) || getenv ("WAYLAND_SOCKET" )) {
258
- struct wlr_backend * wl_backend = attempt_wl_backend (display ,
259
- create_renderer_func );
255
+ struct wlr_backend * wl_backend = attempt_wl_backend (display );
260
256
if (!wl_backend ) {
261
257
goto error ;
262
258
}
@@ -269,7 +265,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
269
265
const char * x11_display = getenv ("DISPLAY" );
270
266
if (x11_display ) {
271
267
struct wlr_backend * x11_backend =
272
- attempt_x11_backend (display , x11_display , create_renderer_func );
268
+ attempt_x11_backend (display , x11_display );
273
269
if (!x11_backend ) {
274
270
goto error ;
275
271
}
@@ -297,8 +293,8 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
297
293
}
298
294
wlr_multi_backend_add (backend , libinput );
299
295
300
- struct wlr_backend * primary_drm = attempt_drm_backend ( display , backend ,
301
- multi -> session , create_renderer_func );
296
+ struct wlr_backend * primary_drm =
297
+ attempt_drm_backend ( display , backend , multi -> session );
302
298
if (!primary_drm ) {
303
299
wlr_log (WLR_ERROR , "Failed to open any DRM device" );
304
300
wlr_backend_destroy (libinput );
0 commit comments