I am do a multi video app, there are some limmits: 1. the the tmp surfaces has different pixel format with main surface (YUY2 for tmp surfaces and RGB16/32 for main surface).
2. due to the original video frame size, the tmp surfaces maybe larger than main surface. 3. the tmp surfaces maybe overlapped. does the operation on one tmp surface affect the another tmp surface? as above limmits existed, can i still using GetSubSurface? and even using GetSubSurface, does blit two tmp surfaces to each owo main surface(unichrome have two layers) thread safe? > Deng XueFeng wrote: > > no, when i do N(N >= 2) blit from N tmp surface to one main surface, > > the display maybe be confused and the cpu will reach 100%. > > after i add lock to every DFB interface(Blit, StretchBlit, ....), all > > works well. > > > > I don't known which one should add lock in multithreaded env. > > You should not use an IDirectFBSurface interface instance from multiple > threads, at least not all functions are safe. The core implementation IS > thread (even process) safe and you just need to create another instance > of IDirectFBSurface using GetSubSurface(surface,NULL,&new_interface). > > -- > Best regards, > Denis Oliver Kropp > > .------------------------------------------. > | DirectFB - Hardware accelerated graphics | > | http://www.directfb.org/ | > "------------------------------------------" -- Deng XueFeng <[EMAIL PROTECTED]> _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev