Is the following a "safe" operation:

IDirectFBSurface *surfaceOne = ...;
IDirectFBSurface *surfaceTwo = ...;
int bpl;
void *mem;
surfaceOne->Lock(surfaceOne, DSLF_WRITE, &mem, &bpl);
// change the pixels of mem using something other interface
surfaceTwo->Blit(surfaceTwo, surfaceOne, 0, 0, 0);

Do I need to call surfaceOne->Unlock(surfaceOne); 
before I blit surfaceOne onto surfaceTwo?

If the answer is yes, what if I did this instead:
IDirectFBSurface *surfaceOne = ...;
IDirectFBSurface *surfaceTwo = ...;
IDirectFBSurface *sub;
surfaceOne->GetSubSurface(surfaceOne, 0, &sub);
int bpl;
void *mem;
sub->Lock(sub, DSLF_WRITE, &mem, &bpl);
// change the pixels of mem using something other interface
surfaceTwo->Blit(surfaceTwo, surfaceOne, 0, 0, 0);

Do I need to call sub->Unlock(sub); before I blit surfaceOne onto
surfaceTwo?

regards
-- 
Anders Bakken
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to