The dsc is ================================================================ ...... primary->GetSize (primary, &screen_w, &screen_h); dsc.flags = DSDESC_CAPS | DSDESC_WIDTH | DSDESC_HEIGHT; dsc.caps = DSCAPS_NONE; dsc.width = screen_w; dsc.height = screen_h;
...... dfb->CreateSurface (dfb, &dsc, &tempSurface); tempSurface->SetBlittingFlags (tempSurface, DSBLIT_NOFX); ...... ================================================================ Thanks. Jack > > "Lionel Landwerlin" <llandwer...@gmail.com> > Le mercredi 28 octobre 2009 à 15:49 -0700, Jack W a écrit : > > How did you fill the dsc structure ? > > --- On Wed, 10/28/09, Jack W <ji...@yahoo.com> wrote: From: Jack W <ji...@yahoo.com> Subject: [directfb-dev] Blit is slow (modified post) - Re: How to save the current framebuffer to a surface? To: directfb-dev@directfb.org Date: Wednesday, October 28, 2009, 6:49 PM Blit from the primary to another surface is very slow, if there is any problem in my code? I tried the following code. ========================================================== ...... IDirectFBSurface *tempSurface; dfb->CreateSurface (dfb, &dsc, &tempSurface); /* The tempSurface is not primary. */ ...... while (...) { ...... primary->FillTriangle(....); primary->DrawLine(....); ..... primary->Flip (primary, NULL, DSFLIP_ONSYNC); /* Filp here because I want to save the primary surface to tempSurface. Is my thought correct? */ tempSurface->Blit(tempSurface, primary, NULL, 0, 0); primary->Blit(primary, tempSurface, NULL, 200, 200); /* Offset the previous screen. */ primary->Flip (primary, NULL, DSFLIP_ONSYNC); // Main loop flip ...... } ...... ========================================================== This loop had 0.5 second delay when "tempSurface->Blit(tempSurface, primary, NULL, 0, 0)" was executed. If I commented this line, no delay. Does anyone know the reason? Thanks a lot! Jack -----Inline Attachment Follows----- _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
_______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev