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>
dev
Daniel Stone 3 years ago committed by Pekka Paalanen
parent 89d0d90306
commit d696f8df1f
  1. 10
      libweston/renderer-gl/gl-renderer.c

@ -2096,12 +2096,10 @@ unsupported:
gb->pitch = pitch; gb->pitch = pitch;
gb->shader_variant = shader_variant; gb->shader_variant = shader_variant;
memcpy(gb->offset, offset, sizeof(offset)); ARRAY_COPY(gb->offset, offset);
memcpy(gb->hsub, hsub, sizeof(hsub)); ARRAY_COPY(gb->hsub, hsub);
memcpy(gb->vsub, vsub, sizeof(vsub)); ARRAY_COPY(gb->vsub, vsub);
gb->gl_format[0] = gl_format[0]; ARRAY_COPY(gb->gl_format, gl_format);
gb->gl_format[1] = gl_format[1];
gb->gl_format[2] = gl_format[2];
gb->gl_pixel_type = gl_pixel_type; gb->gl_pixel_type = gl_pixel_type;
gb->needs_full_upload = true; gb->needs_full_upload = true;

Loading…
Cancel
Save