reply to discussion

Post a reply to the thread: Double Buffering Implementation - Clarification Required

Your Message

If you are already a member Click here to log in
 
  • :)
  • :heart:
  • :(
  • ;)
  • :p
  • :cool:
  • :rolleyes:
  • :ah:
  • :evil:
  • :flamemad:
  • :sad:
  • :laugh:
  • :D
  • :smart:
  • :blush:

Send Trackbacks to (Separate multiple URLs with spaces)

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

  • If selected, :) will not be replaced with smile

Subscription

Topic Review (Newest First)

  • 06-02-2009, 09:28 AM
    samratsakthi
    Hi friends,
    i have few queries related to double buffering implementation.

    1) Is there any harm in explicitly implementing the double buffering even though
    the device implicitly supports it. In the sense i am not using the isDoubleBuffered() API
    even though it returned 'true' when i checked it using an sample application in the device.

    2) The harm i mentioned here refers to Heap memory consumption as well performance vice.

    3) Is there any difference in explicit & implicit implementation of double buffering. Will it
    vary according to each & every device.

    4) Do we need to rely always only on the implicit implementation of double buffering( assuming
    the device supports it implicitly).

    Problem Description:

    i have written a sample application(Client-Server model) which uses canvas and
    connection type i am using is HTTP.
    Now this application was working fine(only related to UI i m refering) until i was using
    the explicit implementation of double buffering irrespective of whether device implicitly support or
    not.
    I did the modifications in the application like if the double buffering is implicitly supported
    by the device then don't use the explicit implementation.
    Finally after these changes when i executed the application it is working fine till the observed
    the problem related to UI in the relaunch onwards.
    The UI is not getting painted properly.this is happening after selecting the APN settings. In a
    distorted manner like blank screen it appears for 5 to 6 secs then everything becomes proper. Now the UI
    looks fine.

    Code:

    protected void paint(Graphics pGraphicsObj) {

    if (!isDoubleBuffered()) {
    mimageScreenObj = Image.createImage(WIDTH,
    HEIGHT);
    mgraphicsDBObj = mimageScreenObj.getGraphics();
    paintscreen(mgraphicsDBObj);
    pGraphicsObj.drawImage(mimageScreenObj, 0, 0, 0);
    } else {
    paintscreen(pGraphicsObj);
    }
    }


    Thanks,
    Sakthivel

Posting Permissions

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