mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 14:38:07 +02:00
gl-renderer: split out textured draw setup
Refactor textured draw setup into a separate function, preparing for a future where we set up solid draws from init_for_paint_node as well. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
37db081f82
commit
095f511d53
1 changed files with 12 additions and 5 deletions
|
|
@ -1450,8 +1450,8 @@ gl_shader_config_set_input_textures(struct gl_shader_config *sconf,
|
|||
}
|
||||
|
||||
static bool
|
||||
gl_shader_config_init_for_paint_node(struct gl_shader_config *sconf,
|
||||
struct weston_paint_node *pnode)
|
||||
prepare_textured_draw(struct gl_shader_config *sconf,
|
||||
struct weston_paint_node *pnode)
|
||||
{
|
||||
struct gl_renderer *gr = get_renderer(pnode->surface->compositor);
|
||||
struct gl_surface_state *gs = get_surface_state(pnode->surface);
|
||||
|
|
@ -1461,9 +1461,6 @@ gl_shader_config_init_for_paint_node(struct gl_shader_config *sconf,
|
|||
GLint filter;
|
||||
int i;
|
||||
|
||||
if (!pnode->surf_xform_valid)
|
||||
return false;
|
||||
|
||||
*sconf = (struct gl_shader_config) {
|
||||
.req.texcoord_input = SHADER_TEXCOORD_INPUT_SURFACE,
|
||||
.projection = pnode->view->transform.matrix,
|
||||
|
|
@ -1508,6 +1505,16 @@ gl_shader_config_init_for_paint_node(struct gl_shader_config *sconf,
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
gl_shader_config_init_for_paint_node(struct gl_shader_config *sconf,
|
||||
struct weston_paint_node *pnode)
|
||||
{
|
||||
if (!pnode->surf_xform_valid)
|
||||
return false;
|
||||
|
||||
return prepare_textured_draw(sconf, pnode);
|
||||
}
|
||||
|
||||
static int
|
||||
output_has_borders(struct weston_output *output)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue