mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 22:48:14 +02:00
color: use weston_mat3f for mapping step
Replace a plain array with a type-safe documented structure. This will get more wide use later. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
98ec0d9b6c
commit
70b5ec5bfe
3 changed files with 3 additions and 3 deletions
|
|
@ -988,7 +988,7 @@ translate_matrix_element(struct weston_color_mapping *map, cmsStage *elem)
|
|||
*/
|
||||
for (c = 0; c < 3; c++)
|
||||
for (r = 0; r < 3; r++)
|
||||
map->u.mat.matrix[c * 3 + r] = data->Double[r * 3 + c];
|
||||
map->u.mat.matrix.col[c].el[r] = data->Double[r * 3 + c];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ struct weston_color_mapping_3dlut {
|
|||
* A 3x3 matrix and data is arranged as column major
|
||||
*/
|
||||
struct weston_color_mapping_matrix {
|
||||
float matrix[9];
|
||||
struct weston_mat3f matrix;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@ gl_shader_config_set_color_transform(struct gl_renderer *gr,
|
|||
break;
|
||||
case SHADER_COLOR_MAPPING_MATRIX:
|
||||
assert(sconf->req.color_mapping == SHADER_COLOR_MAPPING_MATRIX);
|
||||
ARRAY_COPY(sconf->color_mapping.matrix, gl_xform->mapping.mat.matrix);
|
||||
ARRAY_COPY(sconf->color_mapping.matrix, gl_xform->mapping.mat.matrix.colmaj);
|
||||
ret = true;
|
||||
break;
|
||||
case SHADER_COLOR_MAPPING_IDENTITY:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue