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 <ji...@yahoo.com> wrote:
>         
>         From: Jack W <ji...@yahoo.com>
>         Subject: Re: [directfb-dev] How to save the current
>         framebuffer to a surface?
>         To: "haithem rahmani" <haithem.rahm...@gmail.com>
>         Cc: directfb-dev@directfb.org
>         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
>         <haithem.rahm...@gmail.com> wrote:
>         
>                 
>                 From: haithem rahmani <haithem.rahm...@gmail.com>
>                 Subject: Re: [directfb-dev] How to save the current
>                 framebuffer to a surface?
>                 To: "Jack W" <ji...@yahoo.com>
>                 Cc: directfb-dev@directfb.org
>                 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
>                 <ji...@yahoo.com> 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
>                         directfb-dev@directfb.org
>                         
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>                         
>                 
>                 
>                 
>                 -----Inline Attachment Follows-----
>                 
>                 _______________________________________________
>                 directfb-dev mailing list
>                 directfb-dev@directfb.org
>                 http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>                 
>         
>         
>         
>         -----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


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

Reply via email to