Combine internal DRM headers into one

Everything always just included both anyway
This commit is contained in:
Drew DeVault 2017-06-10 12:30:02 -04:00
parent 28e3148bbc
commit 2b06f88f0b
4 changed files with 33 additions and 46 deletions

View file

@ -12,8 +12,7 @@
#include <wlr/common/list.h> #include <wlr/common/list.h>
#include <wlr/backend/interface.h> #include <wlr/backend/interface.h>
#include "backend/udev.h" #include "backend/udev.h"
#include "backend/drm/backend.h" #include "backend/drm.h"
#include "backend/drm/drm.h"
#include "common/log.h" #include "common/log.h"
static bool wlr_drm_backend_init(struct wlr_backend_state *state) { static bool wlr_drm_backend_init(struct wlr_backend_state *state) {

View file

@ -13,8 +13,7 @@
#include <GLES3/gl3.h> #include <GLES3/gl3.h>
#include <wayland-server.h> #include <wayland-server.h>
#include <wlr/backend/interface.h> #include <wlr/backend/interface.h>
#include "backend/drm/backend.h" #include "backend/drm.h"
#include "backend/drm/drm.h"
#include "common/log.h" #include "common/log.h"
#include "types.h" #include "types.h"

View file

@ -1,14 +1,23 @@
#ifndef DRM_H #ifndef DRM_BACKEND_H
#define DRM_H #define DRM_BACKEND_H
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <wayland-server.h>
#include <xf86drmMode.h> #include <xf86drmMode.h>
#include <EGL/egl.h> #include <EGL/egl.h>
#include <libudev.h>
#include <gbm.h> #include <gbm.h>
#include <wlr/session.h>
#include <wlr/common/list.h>
#include <wlr/backend/drm.h>
#include "backend/egl.h" #include "backend/egl.h"
#include "backend.h" #include "backend/udev.h"
#include "event.h"
#include "drm.h"
struct wlr_drm_renderer { struct wlr_drm_renderer {
int fd; int fd;
@ -19,6 +28,25 @@ struct wlr_drm_renderer {
bool wlr_drm_renderer_init(struct wlr_drm_renderer *renderer, int fd); bool wlr_drm_renderer_init(struct wlr_drm_renderer *renderer, int fd);
void wlr_drm_renderer_free(struct wlr_drm_renderer *renderer); void wlr_drm_renderer_free(struct wlr_drm_renderer *renderer);
struct wlr_backend_state {
int fd;
dev_t dev;
struct wlr_backend *backend;
struct wl_event_source *drm_event;
struct wl_listener device_paused;
struct wl_listener device_resumed;
struct wl_listener drm_invalidated;
uint32_t taken_crtcs;
list_t *outputs;
struct wlr_drm_renderer renderer;
struct wlr_session *session;
struct wlr_udev *udev;
};
enum wlr_drm_output_state { enum wlr_drm_output_state {
DRM_OUTPUT_DISCONNECTED, DRM_OUTPUT_DISCONNECTED,
DRM_OUTPUT_NEEDS_MODESET, DRM_OUTPUT_NEEDS_MODESET,

View file

@ -1,39 +0,0 @@
#ifndef DRM_BACKEND_H
#define DRM_BACKEND_H
#include <stdbool.h>
#include <stddef.h>
#include <EGL/egl.h>
#include <gbm.h>
#include <libudev.h>
#include <wayland-server.h>
#include <wlr/session.h>
#include <wlr/common/list.h>
#include <wlr/backend/drm.h>
#include "backend.h"
#include "backend/udev.h"
#include "event.h"
#include "drm.h"
struct wlr_backend_state {
int fd;
dev_t dev;
struct wlr_backend *backend;
struct wl_event_source *drm_event;
struct wl_listener device_paused;
struct wl_listener device_resumed;
struct wl_listener drm_invalidated;
uint32_t taken_crtcs;
list_t *outputs;
struct wlr_drm_renderer renderer;
struct wlr_session *session;
struct wlr_udev *udev;
};
#endif