[android-developers] Re: Is there a large efficiency difference between Canvas.drawBitmap or OpenGL?
On Mar 17, 7:27 pm, William wrote: > Do I have to convert all that to GL textures or can I keep all the > bitmap work and convert the final image to a texture to be drawn to > the GL surface. If I have to convert it all to the textures and draw > to the textures, will there be any performance gain by just drawing > the final image to the GL surface but to the rest using Canvas? Not in this case, no. The way to think about it is in terms of the amount of data going from main (CPU) memory to graphics (GPU) memory. If you do all the compositing in software then you have to send a full frame's worth of data to the GPU every frame. Using OpenGL to then draw it would provide no benefit over just sending it straight to the screen (it would almost certainly be slower, in fact). The case where using OpenGL provides a benefit is when you have a lot of bitmap data that doesn't change. That can be just be sent to the GPU once as textures and then you can draw using those textures and the compositing will be done quickly by the GPU. If you have some bitmap data that is static, and some which changes then it is harder to predict the performance. Trying both ways is probably the only way to get a definitive answer. -- Jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is there a large efficiency difference between Canvas.drawBitmap or OpenGL?
I am not too familiar with how GL works. Is the performance gain happen in writing to the screen or doing the image manipulation or BOTH. I mean I know I can convert a bitmap to a texture and put it on the GL surface. Most of my code is done using canvas to draw to off screen bitmaps before i finally draw the composite image to the screen. Do I have to convert all that to GL textures or can I keep all the bitmap work and convert the final image to a texture to be drawn to the GL surface. If I have to convert it all to the textures and draw to the textures, will there be any performance gain by just drawing the final image to the GL surface but to the rest using Canvas? On Mar 15, 4:57 pm, Tim Bray wrote: > On Sun, Mar 15, 2009 at 1:30 PM, Jon Colverson wrote: > > Interestingly, the emulator is slower than the G1 when using OpenGL > > because the emulator uses a (emulated) software OpenGL implementation. > > 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 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is there a large efficiency difference between Canvas.drawBitmap or OpenGL?
On Sun, Mar 15, 2009 at 1:30 PM, Jon Colverson wrote: > Interestingly, the emulator is slower than the G1 when using OpenGL > because the emulator uses a (emulated) software OpenGL implementation. 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 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is there a large efficiency difference between Canvas.drawBitmap or OpenGL?
On Mar 11, 3:31 pm, William wrote: > Is there a large efficiency difference between Canvas.drawBitmap or > OpenGL. I am drawing using Canvas.drawBitmap and running slowing FPS, > would openGL speed that up a lot you think? In short, yes. I was initially trying to use Canvas for my game, but the performance on the G1 wasn't good enough because Canvas is not currently hardware accelerated. Switching to OpenGL provided a significant boost (I'm sorry I don't have specific benchmark numbers). Interestingly, the emulator is slower than the G1 when using OpenGL because the emulator uses a (emulated) software OpenGL implementation. -- Jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is there a large efficiency difference between Canvas.drawBitmap or OpenGL?
I think it probably would speed up your drawing, but OpenGL probably also uses more battery because it needs the hardware gpu to be enabled too. On 11 mrt, 16:46, Stoyan Damov wrote: > What is it that you are drawing, how are you drawing it, have you > profiled your code? > > > > On Wed, Mar 11, 2009 at 5:31 PM, William wrote: > > > Greetings Developers, > > > I am just putting this question out there. > > > Is there a large efficiency difference between Canvas.drawBitmap or > > OpenGL. I am drawing using Canvas.drawBitmap and running slowing FPS, > > would openGL speed that up a lot you think? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is there a large efficiency difference between Canvas.drawBitmap or OpenGL?
What is it that you are drawing, how are you drawing it, have you profiled your code? On Wed, Mar 11, 2009 at 5:31 PM, William wrote: > > Greetings Developers, > > I am just putting this question out there. > > Is there a large efficiency difference between Canvas.drawBitmap or > OpenGL. I am drawing using Canvas.drawBitmap and running slowing FPS, > would openGL speed that up a lot you think? > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---