- this commit only affects this test.
Change-Id: I23498cee31735598dddfc6e92fa3e3107bac1cda
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
tbmSurface = tbm_surface_create(w, h, TBM_FORMAT_ARGB8888);
tbm_surface_map(tbmSurface, TBM_SURF_OPTION_WRITE | TBM_SURF_OPTION_READ, &tbmSurface_info);
+ uint32_t stride = tbmSurface_info.planes[0].stride;
unsigned char *ptr = tbmSurface_info.planes[0].ptr;
+
for (int j = 0; j < h; j++)
{
- for (int i = 0; i < w; i++)
+ for (int i = 0; i < stride/4; i++)
{
- ptr[0] = b;
- ptr[1] = g;
- ptr[2] = r;
- ptr[3] = a;
+ if (i < w) {
+ ptr[0] = b;
+ ptr[1] = g;
+ ptr[2] = r;
+ ptr[3] = a;
+ }
ptr += 4;
}
}