Generalize DPMS, remove DRM refs from example

This commit is contained in:
Drew DeVault 2017-05-31 15:38:26 -04:00
parent 03c9b46034
commit fee409bd0a
10 changed files with 65 additions and 50 deletions

View file

@ -2,7 +2,9 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <wlr/session.h>
#include "common/log.h"
#include "backend/drm/backend.h"
#include "backend.h"
struct wlr_backend *wlr_backend_create(const struct wlr_backend_impl *impl,
@ -34,3 +36,11 @@ void wlr_backend_destroy(struct wlr_backend *backend) {
// TODO: free outputs
free(backend);
}
struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
struct wlr_session *session) {
// TODO: Choose the most appropriate backend for the situation
struct wlr_backend *wlr;
wlr = wlr_drm_backend_create(display, session);
return wlr;
}