Merge branch 'master' into texture-redesign

This commit is contained in:
emersion 2018-03-26 19:13:13 -04:00
commit adf4fb08dd
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
14 changed files with 152 additions and 68 deletions

View file

@ -66,8 +66,10 @@ struct roots_config {
struct wl_list bindings;
struct wl_list keyboards;
struct wl_list cursors;
char *config_path;
char *startup_cmd;
bool debug_damage_tracking;
};
/**

View file

@ -26,9 +26,9 @@ struct wlr_renderer_impl {
bool (*render_texture_with_matrix)(struct wlr_renderer *renderer,
struct wlr_texture *texture, const float matrix[static 9],
float alpha);
void (*render_quad)(struct wlr_renderer *renderer,
void (*render_quad_with_matrix)(struct wlr_renderer *renderer,
const float color[static 4], const float matrix[static 9]);
void (*render_ellipse)(struct wlr_renderer *renderer,
void (*render_ellipse_with_matrix)(struct wlr_renderer *renderer,
const float color[static 4], const float matrix[static 9]);
const enum wl_shm_format *(*formats)(
struct wlr_renderer *renderer, size_t *len);

View file

@ -30,14 +30,24 @@ bool wlr_render_texture(struct wlr_renderer *r, struct wlr_texture *texture,
bool wlr_render_texture_with_matrix(struct wlr_renderer *r,
struct wlr_texture *texture, const float matrix[static 9], float alpha);
/**
* Renders a solid quad in the specified color.
* Renders a solid rectangle in the specified color.
*/
void wlr_render_colored_quad(struct wlr_renderer *r,
void wlr_render_rect(struct wlr_renderer *r, const struct wlr_box *box,
const float color[static 4], const float projection[static 9]);
/**
* Renders a solid quadrangle in the specified color with the specified matrix.
*/
void wlr_render_quad_with_matrix(struct wlr_renderer *r,
const float color[static 4], const float matrix[static 9]);
/**
* Renders a solid ellipse in the specified color.
*/
void wlr_render_colored_ellipse(struct wlr_renderer *r,
void wlr_render_ellipse(struct wlr_renderer *r, const struct wlr_box *box,
const float color[static 4], const float projection[static 9]);
/**
* Renders a solid ellipse in the specified color with the specified matrix.
*/
void wlr_render_ellipse_with_matrix(struct wlr_renderer *r,
const float color[static 4], const float matrix[static 9]);
/**
* Returns a list of pixel formats supported by this renderer.

View file

@ -27,7 +27,7 @@ void wlr_box_transform(const struct wlr_box *box,
struct wlr_box *dest);
/**
* Creates the smallest box that contains a rotated box.
* Creates the smallest box that contains the box rotated about its center.
*/
void wlr_box_rotated_bounds(const struct wlr_box *box, float rotation,
struct wlr_box *dest);

View file

@ -26,4 +26,11 @@ void wlr_region_transform(pixman_region32_t *dst, pixman_region32_t *src,
void wlr_region_expand(pixman_region32_t *dst, pixman_region32_t *src,
int distance);
/*
* Builds the smallest possible region that contains the region rotated about
* the point (ox, oy).
*/
void wlr_region_rotated_bounds(pixman_region32_t *dst, pixman_region32_t *src,
float rotation, int ox, int oy);
#endif