Is there a large efficiency difference between Canvas.drawBitmap or OpenGL?

by Stoyan Damov » Wed, 11 Mar 2009 23:46:21 GMT


Sponsored Links
 What is it that you are drawing, how are you drawing it, have you
profiled your code?




--~--~---------~--~----~------------~-------~--~----~



Is there a large efficiency difference between Canvas.drawBitmap or OpenGL?

by Tim Bray » Mon, 16 Mar 2009 04:57:56 GMT


 



Interestingly, on my app (decorating a map with geotagged points,
recording and playing back sound, launching web browser) the G1 is not
significantly slower than the emulator, so I just don't use the
emulator any more.  Got a surprise the other day when I was doing some
debugging, had the phone in my hand, and it went off because somebody
was calling me...

 -Tim

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. General Android Bug

Hi, im a HTC Hero user, with android 1.5, and i'm from Spain.

I wanted to report a general software bug, which is a little annoying.
I'ts referred to the "Time". There's an option to set time
automatically, so my device detects where am I and configures the
local time, so i don't need to change it manually.

I travel a lot, but currently i live in Canary Islands, which belong
to Spain but they don't share the same local time.

Spain is GMT +1, while Canary Islands is GMT +0, i mean, they share
local time with London.

The bug is that my device (and all the android devices that my friends
got) puts Canary Islands as GMT +1.

When I was in London, it did good, GMT +0. When I was in Spain, it did
good, GMT +1, but when i am in Canary Islands, it says GMT +1, and
it's GMT +0.

Also when I'm in London, Spain, Germany, etc. and I want to see what
time is it in Canary Islands, it says the same as Spain, GMT +1, while
London keeps staying at GMT +0.

It seems that Google configured Canary Islands as GMT +1, while it's
GMT +0

Hope that i explained it all with detail. Sorry for my bad english :)

Thank you for reading this mail, and keep this up ! Its the first time
i LOVE mobile phones ^^

-- 

2. Seek advice about the problem with the help of android application connects HttpServer

I wanna develop a application in Android to connet HttpServer.
But there is  something must be wrong.so if anyone read it or have
advice ,please tell me.I was troubled by this issue.

i am a green hand in Android , so careful and prolixity,please be
patient. If you are happy to give my opinion I will be very grateful,
if you do not mind, I will often ask your advice.thank you.


part 1 :...i have created two TextView  to input userid and
password;so i try to get the InpustStream
    code:
            switch(v.getId()) {
                case R.id.ok:
             //the code of  class PackMessage show you later
                        PackMessage pm = new PackMessage();
           //sendContent to get the message that have packed
                        sendContent = pm.login(id.getText().toString(), 
pas.getText
().toString());
          //let sm get packedm.toString
                        SendMessage sm = new 
SendMessage(sendContent.toString());
          //the class SendMessage have implemented Runnable
                        Thread smthread = new Thread(sm);
         //so turn to method run in class SendMessage
                        smthread.start();
                        break;

                case R.id.cancel:
                        finish();
                        break;
           }



part2: this is the code of class PackMessage


                public class PackMessage {
        public StringBuffer  login(String userid,String password)
        {

                       //put the input from in sb

                StringBuffer sb = new StringBuffer();
                sb.append("<purpose>login</purpose>");
                sb.append("<userid>"+userid+"</userid>" );
                sb.append("<password>"+password+"</password>");
                return sb;

        }

}

part3:    the constructor of  class SendMessage

                       public SendMessage(String sendContent)
        {
                SendMessage.sendContent = sendContent;
        }

part4:   the code of   run();

                public void run() {

                getHttpStream();
                Intent Intent = new Intent();
// that is the point :getHttpStram();
                Intent.putExtra("id", getHttpStream().toString());
                Intent.setAction("com.google.lm.Main");
                startActivity(Intent);

        }



part5 : code of getHttpStram();and the


public static InputStream getHttpStream() {
                HttpPost httppost = new 
HttpPost("http://localhost:8080/J2ME/servlet/
HelloServlet");
                DefaultHttpClient httpclient = new DefaultHttpClient();
                StringEntity reqEntity;
                try {
                        reqEntity = new StringEntity(sendContent.toString());
                        
reqEntity.setContentType("application/x-www-form-urlencoded");
                        httppost.setEntity(reqEntity);
                 //always catched IOException when ------
httpclient.execute(httppost);
                        HttpResponse response = httpclient.execute(httppost);
                        HttpEntity entity = response.getEntity();
                        if(entity != null) {
                                return entity.getContent();
                        }
                }
                catch (UnsupportedEncodingException e) {
                        e.printStackTrace();
                }
                catch (IllegalStateException e) {
                        e.printStackTrace();
                }
                catch (IOException e) {
                        e.printStackTrace();
                }
                return null;
        }
}

-- 

3. minSdkVersion and file editing

4. Android 2.0

5. any good tutorial for database stuff

6. List view with textviews and imageview, best practices

7. Library include ?