×

Discussion Board

Results 1 to 2 of 2

Thread: Draw sync?

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    21

    Draw sync?

    Hi,

    I am wondering if there is a way to continue drawing images as animation onto screen with DrawNow() / DrawDeferred()?

    I am looking for way to determine the frame rate per seconds. Therefore, not sure if I should use Cperiodic to change images continues to find out the period of time?


    Thanks

  2. #2
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,100

    Re: Draw sync?

    Quote Originally Posted by stephen.cheung View Post
    Hi,

    I am wondering if there is a way to continue drawing images as animation onto screen with DrawNow() / DrawDeferred()?

    I am looking for way to determine the frame rate per seconds. Therefore, not sure if I should use Cperiodic to change images continues to find out the period of time?


    Thanks
    Hello Stephen,

    Indeed, the DrawNow() executes the draw operation right away, while DrawDeferred() performs with a delay.
    You can use this in conjunction to displaying animations. I have provided below some information that you
    may find useful, please check them thru and let's continue discussion, ok?

    As the draw operation is complex and heavy operation, for animation you might want to use the DrawNow.
    In non-time-critical applications, but where the screen requires like 3-4 draws() for result, the framework
    is able to draw the screen 4th time called. In a way delaying the draw ops to the 4th call, which brings
    us to the DrawDeferred(). Actually the framework bases the operations on several factors.

    When you use DrawDeferred() it will reduce actual draw work, thus increasing the speed. However, within the
    animation each frame should be shown, basically requiring the use of DrawNow().

    Possible having many controls in the applicationm and to be able to reflect changes of one control (e.g.
    text in Label control) instead of calling DrawDeferred() you can call iLabel->DrawDeferred(). This will
    result drawing in only Label control and not all of the other controls. You would have increased performance
    this way.

    btw. related Known issue:
    http://wiki.forum.nokia.com/index.ph...60_5th_Edition

    According to "Developing Series 60 Applications" by Leigh Edwards, p243:

    DrawDeferred() adds a draw request to the current Window Server buffer, to be sent to the Window Server once the buffer is full.

    DrawNow() does the same as DrawDeferred(), but then forces a flush of the command buffer.

    He also goes on to say that overusing DrawNow() is inefficient and should be avoided.
    Link to a wiki article on: "How_to_use_CPeriodic_for_a_steady_stream_of_ticks"

    http://wiki.forum.nokia.com/index.ph...tream_of_ticks

    Check this out too...
    http://discussion.forum.nokia.com/fo...p/t-87079.html

    Best Regards,
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

Similar Threads

  1. View server panic with 11 on draw
    By raj_rr7 in forum Symbian User Interface
    Replies: 7
    Last Post: 2009-05-18, 11:36
  2. why can i not draw line in Draw()?
    By isarc in forum Symbian
    Replies: 7
    Last Post: 2008-05-13, 10:51
  3. Replies: 0
    Last Post: 2008-04-15, 08:38
  4. Mail Sync for S60 / S60 3rd Devices
    By bmenke in forum PC Suite API and PC Connectivity SDK
    Replies: 4
    Last Post: 2006-09-17, 06:24
  5. Cannot Sync through bluetooth or usb on 6630
    By Un6rand3d in forum Bluetooth Technology
    Replies: 0
    Last Post: 2004-12-10, 09:14

Posting Permissions

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