shared/helpers: use ARRAY_COPY where possible

In "backend-drm: simplify compile time array copy", ARRAY_COPY was
introduced to be used by the DRM-backend.

In this patch we expand its usage to other code where hardcoded arrays
are being copied.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro
2021-04-28 12:17:21 -03:00
parent 58393ca733
commit b4cf450ce1
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -3021,9 +3021,9 @@ gl_renderer_surface_copy_content(struct weston_surface *surface,
glViewport(0, 0, cw, ch);
glDisable(GL_BLEND);
if (gs->y_inverted)
memcpy(sconf.projection.d, projmat_normal, sizeof projmat_normal);
ARRAY_COPY(sconf.projection.d, projmat_normal);
else
memcpy(sconf.projection.d, projmat_yinvert, sizeof projmat_yinvert);
ARRAY_COPY(sconf.projection.d, projmat_yinvert);
sconf.projection.type = WESTON_MATRIX_TRANSFORM_SCALE |
WESTON_MATRIX_TRANSFORM_TRANSLATE;