It removes unused buffer_count variable from dri2_egl_surface.
And it polishes the assert of dri2_drm_get_buffers_with_format().
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
_EGLSurface base;
__DRIdrawable *dri_drawable;
__DRIbuffer buffers[5];
- int buffer_count;
bool have_fake_front;
#ifdef HAVE_X11_PLATFORM
if (update_buffers(dri2_surf) < 0)
return NULL;
- dri2_surf->buffer_count =
- droid_get_buffers_parse_attachments(dri2_surf, attachments, count);
+ *out_count = droid_get_buffers_parse_attachments(dri2_surf, attachments, count);
if (width)
*width = dri2_surf->base.Width;
if (height)
*height = dri2_surf->base.Height;
- *out_count = dri2_surf->buffer_count;
-
return dri2_surf->buffers;
}
struct dri2_egl_surface *dri2_surf = loaderPrivate;
int i, j;
- dri2_surf->buffer_count = 0;
for (i = 0, j = 0; i < 2 * count; i += 2, j++) {
assert(attachments[i] < __DRI_BUFFER_COUNT);
- assert(dri2_surf->buffer_count < 5);
+ assert(j < ARRAY_SIZE(dri2_surf->buffers));
switch (attachments[i]) {
case __DRI_BUFFER_BACK_LEFT:
dri2_egl_display(dri2_surf->base.Resource.Display);
xcb_rectangle_t rectangle;
- dri2_surf->buffer_count = count;
dri2_surf->have_fake_front = false;
/* This assumes the DRI2 buffer attachment tokens matches the