comparison src/X_supp.c @ 1519:74635b07a83a

Porting Skia backend to latest version and with X
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 17 May 2011 12:17:15 +0800
parents 84368f4bc988
children
comparison
equal deleted inserted replaced
1518:80e055978461 1519:74635b07a83a
743 shminfo->readOnly = 0; 743 shminfo->readOnly = 0;
744 744
745 XShmAttach(display, shminfo); 745 XShmAttach(display, shminfo);
746 746
747 switch(depth) { 747 switch(depth) {
748 case 24: surf_fmt = CAIRO_FORMAT_RGB24; break; 748 case 24: surf_fmt = MB_IFMT_RGB24; break;
749 case 32: surf_fmt = CAIRO_FORMAT_ARGB32; break; 749 case 32: surf_fmt = MB_IFMT_ARGB32; break;
750 } 750 }
751 751
752 xmb_rt->backend_surface = 752 xmb_rt->backend_surface =
753 mbe_image_surface_create_for_data((unsigned char *)ximage->data, 753 mbe_image_surface_create_for_data((unsigned char *)ximage->data,
754 surf_fmt, 754 surf_fmt,
841 xmb_rt->backend_surface = 841 xmb_rt->backend_surface =
842 mbe_win_surface_create(xmb_rt->display, 842 mbe_win_surface_create(xmb_rt->display,
843 xmb_rt->win, 843 xmb_rt->win,
844 fmt, 844 fmt,
845 w, h); 845 w, h);
846 ASSERT(xmb_rt->backend_surface != NULL);
846 } 847 }
847 848
848 xmb_rt->cr = mbe_create(xmb_rt->surface); 849 xmb_rt->cr = mbe_create(xmb_rt->surface);
849 xmb_rt->backend_cr = mbe_create(xmb_rt->backend_surface); 850 xmb_rt->backend_cr = mbe_create(xmb_rt->backend_surface);
850 851