backend/headless: use FBOs instead of pbuffers

This commit is contained in:
Simon Ser 2020-03-10 17:07:49 +01:00 committed by Drew DeVault
parent 5dc3a9c754
commit 40513f1a0e
3 changed files with 86 additions and 33 deletions

View file

@ -3,6 +3,7 @@
#include <wlr/backend/headless.h>
#include <wlr/backend/interface.h>
#include <wlr/render/gles2.h>
#define HEADLESS_DEFAULT_REFRESH (60 * 1000) // 60 Hz
@ -16,6 +17,7 @@ struct wlr_headless_backend {
struct wl_list input_devices;
struct wl_listener display_destroy;
bool started;
GLenum internal_format;
};
struct wlr_headless_output {
@ -24,7 +26,8 @@ struct wlr_headless_output {
struct wlr_headless_backend *backend;
struct wl_list link;
void *egl_surface;
GLuint fbo, rbo;
struct wl_event_source *frame_timer;
int frame_delay; // ms
};