Le mercredi 28 octobre 2009 à 15:35 -0700, Jack W a écrit :
> Blit from the primary to another surface is very slow, if there is any
> problem in my code?
>
> I tried the following code.
> ==========================================================
> 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? */
>
> IDirectFBSurface *tempSurface;
>
> dfb->CreateSurface (dfb, &dsc, &tempSurface); /* The
> tempSurface is not primary. */
>
> tempSurface->Blit(tempSurface, primary, NULL, 0, 0); /*
> Offset the previous screen. */
>
> primary->Blit(primary, tempSurface, NULL, 200, 200);
>
> 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
>
>
>
>
>
>
> --- On Mon, 10/26/09, Jack W <[email protected]> wrote:
>
> From: Jack W <[email protected]>
> Subject: Re: [directfb-dev] How to save the current
> framebuffer to a surface?
> To: "haithem rahmani" <[email protected]>
> Cc: [email protected]
> Date: Monday, October 26, 2009, 6:44 PM
>
> I mean the current screen is the current flipped framebuffer
> (ex. I draw some triangles on the primary surface).
>
> I found a method. That is Blit the primary surface to a temp
> surface, then StrechBlit this temp surface back to the primary
> surface. It works. Does anyone have other solution?
>
> Jack
>
>
>
>
> --- On Mon, 10/26/09, haithem rahmani
> <[email protected]> wrote:
>
>
> From: haithem rahmani <[email protected]>
> Subject: Re: [directfb-dev] How to save the current
> framebuffer to a surface?
> To: "Jack W" <[email protected]>
> Cc: [email protected]
> Date: Monday, October 26, 2009, 7:21 AM
>
> Hi,
>
> where does the current screen content come from ?
>
> regards.
>
>
>
> On Mon, Oct 26, 2009 at 7:28 AM, Jack W
> <[email protected]> wrote:
> Hi All,
>
> I want to save the current screen
> (framebuffer) (say 1280x1024) to a surface and
> then display this surface in a small area (say
> 600x400, StrechBlit) in the next frame. How to
> do that? Or does any other method can display
> the previous screen?
>
> BTW, I saw many nice DFB application
> screenshots on www.directfb.org. How can I
> download these example codes?
>
> Thanks a lot for help!
>
> Jack
>
>
>
> _______________________________________________
> directfb-dev mailing list
> [email protected]
>
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>
>
>
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> directfb-dev mailing list
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>
>
>
>
> -----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
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev