mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-04-21 08:50:42 +02:00
gl-renderer: Use ARRAY_COPY for buffer state
We've got a nice shiny ARRAY_COPY macro, so use it rather than memcpy or hand-unrolled assignments. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
89d0d90306
commit
d696f8df1f
1 changed files with 4 additions and 6 deletions
|
|
@ -2096,12 +2096,10 @@ unsupported:
|
|||
|
||||
gb->pitch = pitch;
|
||||
gb->shader_variant = shader_variant;
|
||||
memcpy(gb->offset, offset, sizeof(offset));
|
||||
memcpy(gb->hsub, hsub, sizeof(hsub));
|
||||
memcpy(gb->vsub, vsub, sizeof(vsub));
|
||||
gb->gl_format[0] = gl_format[0];
|
||||
gb->gl_format[1] = gl_format[1];
|
||||
gb->gl_format[2] = gl_format[2];
|
||||
ARRAY_COPY(gb->offset, offset);
|
||||
ARRAY_COPY(gb->hsub, hsub);
|
||||
ARRAY_COPY(gb->vsub, vsub);
|
||||
ARRAY_COPY(gb->gl_format, gl_format);
|
||||
gb->gl_pixel_type = gl_pixel_type;
|
||||
gb->needs_full_upload = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue