Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Feb 2009

    Talking efficient rgb565 buffer to display blitter

    Hi guys.

    We're porting some code to smartphones with S60 3rd sdk.
    Our code renders into a rgb565 buffer (sizes and line pitch are parameter to the renderer)
    I would like to blit this buffer to the fullscreen device.
    Can you plz help me with an efficient solution. How to create a bitmap which can act as a rgb565 render buffer and how to blit this as fast as possible.

    I have created a gl display where we render into a texture, that works fine but a bit slow on older phones.
    I have searched the net, found some examples but usually these blit a preloaded bitmap to the screen.

    Thanks in advance,

  2. #2
    Super Contributor
    Join Date
    Mar 2004

    Re: efficient rgb565 buffer to display blitter

    if i am not wrong you have to 1st transfer your RGB565 to RGB888.

  3. #3
    Registered User
    Join Date
    Jun 2005

    Re: efficient rgb565 buffer to display blitter


    You can blit RGB565 easily with DirectScreenAccess. If you were using OpenglES before, then this is probably good solution for you. Just take a look at some S60 DirectScreenAccess examples how to create DirectScreenAccess etc.

    Then you just have to create a bitmap with EColor64K, copy the buffer into bitmap, and blit it with DirectSceenAccess-

    Here is some meta code to help you with DSA
       //Create DirectScreenAccess
        iDSA = CDirectScreenAccess::NewL( CCoeEnv::Static()->WsSession(), *device, iWindow, *this );
        TRAPD(dsaErr, iDSA->StartL());
        iGc = iDSA->Gc();
       //create bitmap
       iBitmap = new (ELeave) CFbsBitmap; 
       iBitmap->Create( screensize, EColor64K );
       //blit image
       TUint8 *bmpData = (TUint8 *) iBitmap->DataAddress();
      //copy the buffer into bitmap with bmpData pointer..
       //unlockHeap and blit
      iGc->BitBlt(TPoint(0, 0), iBitmap);

  4. #4
    Registered User
    Join Date
    Feb 2009

    Wink Re: efficient rgb565 buffer to display blitter

    Thank you, with your help I was finally able to roll mah pwnzor DSA BMP BLITTAr

  5. #5
    Registered User
    Join Date
    Mar 2003

    Re: efficient rgb565 buffer to display blitter

    If you want to go without DSA than that should be fine as well.
    Just create and use an offscreen bitmap in 565 if you so wish
    and then when you want to flip it just blit it, or parts thereof.

    Using redrawing and flipping the whole bitmap,
    issue a DrawDeferred and then in your containers Draw,
    CWindowGc& gc = SystemGc();
    gc.BitBlt(TPoint(0,0), GetBuffer());

    The screendriver does the translation to whatever the display mode is
    so you don't have to worry about that really.

    If you want to do the same thing but without redrawing you may
    do something like,

    void Flip(RWindow& aWindow)
    CWindowGc& gc = SystemGc();
    gc.BitBlt(TPoint(0,0), GetBuffer());

    With 2nd example you may also blit only dirty regions
    since invalidate and beginredraw both accept partial regions.

Similar Threads

  1. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16
  2. Replies: 0
    Last Post: 2006-11-20, 07:49
  3. Replies: 6
    Last Post: 2005-10-03, 05:51
  4. Dialog's clipping area (again). Nokia experts, please help
    By synov in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-06-26, 14:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts