tdm_helper: show the width of the tbm_surface 72/189072/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 13 Sep 2018 07:22:28 +0000 (16:22 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Thu, 13 Sep 2018 07:24:04 +0000 (16:24 +0900)
When tdm-monitor shows the information, the result
shows the width of the tbm_surface
instead of showing the real size of the buffer(stride/4).

Change-Id: Ib25a118d05798a96dcf4e99a31fd3c7f1462e399

src/tdm_helper.c

index 0c8b336..3607f13 100644 (file)
@@ -872,10 +872,7 @@ _tdm_helper_get_backend_information(tdm_private_module *private_module, char *re
                                format = tbm_surface_get_format(private_layer->showing_buffer->buffer);
                                tbm_surface_get_info(private_layer->showing_buffer->buffer, &buf_info);
 
-                               if (IS_RGB(format))
-                                       size.h = buf_info.planes[0].stride >> 2;
-                               else
-                                       size.h = buf_info.planes[0].stride;
+                               size.h = tbm_surface_get_width(private_layer->showing_buffer->buffer);
                                size.v = tbm_surface_get_height(private_layer->showing_buffer->buffer);
 
                                if (info.src_config.format)