+* 1.5.28
+- Fix pBuffer issue for xcomposite.
+== Sangjin Kim <sangjin3.kim@samsung.com> 2013-04-16
* 1.5.27
- Change the FB configs limitaion from 10 to 32 for each process.
== Sangjin Kim <sangjin3.kim@samsung.com> 2013-04-12
fprintf(stderr, "surface_as_texture:teximage:width=%d,height=%d, glFormat=0x%x, glType=0x%x.\n", surface->width, surface->height, glFormat, glType);
/* glTexImage2D use different RGB order than the contexts in the pixmap surface */
/* glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, surface->width, surface->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, surface->image->data);*/
+
+ if ((glFormat == GL_RGBA || glFormat == GL_BGRA) && glType == GL_UNSIGNED_BYTE) {
+ GLubyte *b = (GLubyte *)surface->image->data;
+ int stride = surface->width * 4;
+ GLubyte *c = &((GLubyte *)surface->image->data)[stride*(surface->height-1)];
+ GLubyte *tmp = (GLubyte*)g_malloc(stride);
+ int irow;
+
+ for(irow = 0; irow < surface->height / 2; irow++) {
+ memcpy(tmp, b, stride);
+ memcpy(b, c, stride);
+ memcpy(c, tmp, stride);
+ b += stride;
+ c -= stride;
+ }
+ g_free(tmp);
+ }
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, surface->width, surface->height, 0, glFormat, glType, surface->image->data);
#endif
}