mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
drm backend: add wlr_output_is_drm
This commit is contained in:
parent
dabfe159de
commit
be95147385
3 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue