Hello all,

I'm porting C/C++ based graphics project to Android where I need to 
transform dynamic graphical tree hierarchy(describing the screen content) 
from the C side to Android Java acitivity.
So far I tried following techinque:
1. call AndroidBitmap_lockPixels() in C
2. recurse thru the tree hierarchy and render every node to the locked 
bitmap in C
3. call AndroidBitmap_unlockPixels()
4. call canvas.drawBitmap() in the onDraw() of my Java activity View

This approach works relatively well but the main performance 
bottleneck(except the relativley frequent JNI calls) is the performance of 
the C rendering part which uses lot of floating point operations (using 
doubles) and therefore is not optimized for the ARM cpus.

Since the C rendering code does most of the graphics operations that are 
already built in the Canvas(Skia) frontend on the Java side I'm now 
thinking that maybe it could be possible to just somehow "serialize" the C 
graphical operations transfer them to Java side where they will be 
interpreted using the Canvas calls.
Also note the graphical structure at the C side can be changed during every 
render frame so I need to this quite frequently...

Is there any Android expert who have experience with simmilar problems? 
Does it make sense to try the alternative approach I decribed above? If so 
what is the fastest way to transfer/share such C data with Java? Or are 
there any other possible solutions?

Thanks in advance for any useful hints,

Rick

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to