Ok,
anyway you're probably experiencing a software blit. But 0.5s... it's
quite slow. So a few more question to find why directfb is doing the
blit operation in software :
- what's the size of the screen ?
- which gfxdriver ?
- what's your default pixelformat (maybe not handled by hardware) ?
Regards,
Le mercredi 28 octobre 2009 à 16:45 -0700, Jack W a écrit :
> 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" <[email protected]>
> > 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 <[email protected]> wrote:
>
> From: Jack W <[email protected]>
> Subject: [directfb-dev] Blit is slow (modified post) - Re: How
> to save the current framebuffer to a surface?
> To: [email protected]
> 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
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>
>
> _______________________________________________
> directfb-dev mailing list
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
--
Lionel Landwerlin <[email protected]>
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev