drm backend: add wlr_output_is_drm

This commit is contained in:
Dominique Martinet 2017-12-19 19:59:08 +01:00
parent dabfe159de
commit be95147385
3 changed files with 6 additions and 1 deletions

View File

@ -658,6 +658,10 @@ static struct wlr_output_impl output_impl = {
.get_gamma_size = wlr_drm_connector_get_gamma_size, .get_gamma_size = wlr_drm_connector_get_gamma_size,
}; };
bool wlr_output_is_drm(struct wlr_output *output) {
return output->impl == &output_impl;
}
static int retry_pageflip(void *data) { static int retry_pageflip(void *data) {
struct wlr_drm_connector *conn = data; struct wlr_drm_connector *conn = data;
wlr_log(L_INFO, "%s: Retrying pageflip", conn->output.name); wlr_log(L_INFO, "%s: Retrying pageflip", conn->output.name);

View File

@ -12,7 +12,6 @@
#include <wlr/backend/session.h> #include <wlr/backend/session.h>
#include <wlr/backend/drm.h> #include <wlr/backend/drm.h>
#include <wlr/types/wlr_output.h>
#include <wlr/render/egl.h> #include <wlr/render/egl.h>
#include "iface.h" #include "iface.h"

View File

@ -4,10 +4,12 @@
#include <wayland-server.h> #include <wayland-server.h>
#include <wlr/backend/session.h> #include <wlr/backend/session.h>
#include <wlr/backend.h> #include <wlr/backend.h>
#include <wlr/types/wlr_output.h>
struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,
struct wlr_session *session, int gpu_fd, struct wlr_backend *parent); struct wlr_session *session, int gpu_fd, struct wlr_backend *parent);
bool wlr_backend_is_drm(struct wlr_backend *backend); bool wlr_backend_is_drm(struct wlr_backend *backend);
bool wlr_output_is_drm(struct wlr_output *output);
#endif #endif