unsigned int pitches[4] = {0,};
unsigned int offsets[4] = {0,};
unsigned int size;
+ tbm_bo bo;
width = tbm_surface_get_width(buffer);
height = tbm_surface_get_height(buffer);
format = tbm_surface_get_format(buffer);
- count = tbm_surface_internal_get_num_bos(buffer);
- for (i = 0; i < count; i++) {
- tbm_bo bo = tbm_surface_internal_get_bo(buffer, i);
- handles[i] = tbm_bo_get_handle(bo, TBM_DEVICE_DEFAULT).u32;
- }
count = tbm_surface_internal_get_num_planes(format);
+
+ bo = tbm_surface_internal_get_bo(buffer, 0);
+ handles[0] = tbm_bo_get_handle(bo, TBM_DEVICE_DEFAULT).u32;
+ for (i = 1; i < count; i++)
+ handles[i] = handles[0];
+
for (i = 0; i < count; i++)
tbm_surface_internal_get_plane_data(buffer, i, &size, &offsets[i], &pitches[i]);