diff options
author | emersion <contact@emersion.fr> | 2018-02-09 22:54:14 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-02-09 22:54:14 +0100 |
commit | bf6d24540000339029a30715f1f72b5b95a45018 (patch) | |
tree | 89c04c0a109bce115f9a749d8e1958d666e1f02d /include | |
parent | 34489dca16ef9e7fd05c161b8b4f2fd5ce5e4ef0 (diff) |
Swap buffers with damage
Diffstat (limited to 'include')
-rw-r--r-- | include/backend/drm/renderer.h | 11 | ||||
-rw-r--r-- | include/wlr/interfaces/wlr_output.h | 2 | ||||
-rw-r--r-- | include/wlr/render/egl.h | 7 |
3 files changed, 14 insertions, 6 deletions
diff --git a/include/backend/drm/renderer.h b/include/backend/drm/renderer.h index a3f19fc3..bf0165bc 100644 --- a/include/backend/drm/renderer.h +++ b/include/backend/drm/renderer.h @@ -41,14 +41,17 @@ bool wlr_drm_surface_init(struct wlr_drm_surface *surf, struct wlr_drm_renderer *renderer, uint32_t width, uint32_t height, uint32_t format, uint32_t flags); -bool wlr_drm_plane_surfaces_init(struct wlr_drm_plane *plane, struct wlr_drm_backend *drm, - int32_t width, uint32_t height, uint32_t format); +bool wlr_drm_plane_surfaces_init(struct wlr_drm_plane *plane, + struct wlr_drm_backend *drm, int32_t width, uint32_t height, + uint32_t format); void wlr_drm_surface_finish(struct wlr_drm_surface *surf); bool wlr_drm_surface_make_current(struct wlr_drm_surface *surf, int *buffer_age); -struct gbm_bo *wlr_drm_surface_swap_buffers(struct wlr_drm_surface *surf); +struct gbm_bo *wlr_drm_surface_swap_buffers(struct wlr_drm_surface *surf, + pixman_region32_t *damage); struct gbm_bo *wlr_drm_surface_get_front(struct wlr_drm_surface *surf); void wlr_drm_surface_post(struct wlr_drm_surface *surf); -struct gbm_bo *wlr_drm_surface_mgpu_copy(struct wlr_drm_surface *dest, struct gbm_bo *src); +struct gbm_bo *wlr_drm_surface_mgpu_copy(struct wlr_drm_surface *dest, + struct gbm_bo *src); #endif diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h index 652be45e..a01f8901 100644 --- a/include/wlr/interfaces/wlr_output.h +++ b/include/wlr/interfaces/wlr_output.h @@ -19,7 +19,7 @@ struct wlr_output_impl { bool (*move_cursor)(struct wlr_output *output, int x, int y); void (*destroy)(struct wlr_output *output); bool (*make_current)(struct wlr_output *output, int *buffer_age); - bool (*swap_buffers)(struct wlr_output *output); + bool (*swap_buffers)(struct wlr_output *output, pixman_region32_t *damage); void (*set_gamma)(struct wlr_output *output, uint32_t size, uint16_t *r, uint16_t *g, uint16_t *b); uint32_t (*get_gamma_size)(struct wlr_output *output); diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h index 6979fd9b..1facc6b8 100644 --- a/include/wlr/render/egl.h +++ b/include/wlr/render/egl.h @@ -1,9 +1,10 @@ #ifndef WLR_EGL_H #define WLR_EGL_H +#include <stdbool.h> #include <EGL/egl.h> #include <EGL/eglext.h> -#include <stdbool.h> +#include <pixman.h> #include <wayland-server.h> struct wlr_egl { @@ -16,6 +17,7 @@ struct wlr_egl { struct { bool buffer_age; + bool swap_buffers_with_damage; } egl_exts; struct wl_display *wl_display; @@ -72,4 +74,7 @@ const char *egl_error(void); bool wlr_egl_make_current(struct wlr_egl *egl, EGLSurface surface, int *buffer_age); +bool wlr_egl_swap_buffers(struct wlr_egl *egl, EGLSurface surface, + pixman_region32_t *damage); + #endif |