I asked a question similar to this a while ago. I wrote a little about
it in a blog post.
http://wp.colliertech.org/cj/?p=442
Cheers,
C.J.
No, as far as I can work out, all the public APIs involves intermediate copies.
GLES texture uploads are excellent if you don't need to read the pixels back - and want to draw more often than update. If you can somehow ignore all the older devices out there, the new 2.2 jnigraphics stuff is better than what was there before (but still involves another copy before making it to the screen). The pre 2.2 Canvas options involve multiple copies and various limitations on subimage updates.
You can break the rules and get access to the raw Surface pixels but the constant churn in this internal API makes it *very* hard to do that across multiple platforms (believe me I've tried).
Unfortunately you have to choose your least worst option :(
- Gus
On 24 May 2010 03:04, "Mfabbri77" <fabbri....@gmail.com> wrote:
Hi Angus,
On May 23, 10:07 am, Angus Lees <al...@google.com> wrote:
> drawBitmap(int[] colors) copies from th...
Any better way/tips to do fullscreen blitting? I'm looking for the
best way to do so (i.e. the way that minimizes redundant memory copies
and that can take advantage of hw acceleration like mdp on MSM7k
chips).
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To po...
sorry, I missed your post first since I was busy with family matters
over the weekend.
Basically it's not disabling the GC but rather it's proper "registering"
your objects so that your JNI code holds references to the objects you
don't want the GC to clean up.
Persistence across JNI calls can be archieved by using Global
References. You can use the JNI method "NewGlobalReference" for that.
See the JNI specs for more details. I still try to fully grasp what
"weak References" are for, though. But that's just a side note, you'll
want (non-weak) Global References.
HTH,
-hwh
I posted a code some months ago that shows how to update the screen,
because i do that in my app too.
Search for guihazan and you'll find it.
There's a sample in the new ndk, bitmap-plasma.
Does someone know if the ndkr4 will work with Android 1.6?
regards
guich
Most of the NDK will work with 1.6 just fine. The <android/bitmap.h>
code that bitmap-plasma uses requires 2.2, however.
- Gus