i'am currently writting an application for android, and i wanted to
use skia inside JNI to draw onto a canvas.What I wanted to do, is to
build a static version of skia for android and link it to my code.
First i wanted to make sure this is possible? And then if my build of
skia will run on all android device? (at least arm device?)
Thanks.
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To post to this group, send email to skia-d...@googlegroups.com.
To unsubscribe from this group, send email to skia-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/skia-discuss?hl=en.
thanks for your response. I was able to build skia for android (from
skia svn repository) but it seems that the build process doesn't
provide a libskia.a
How did you build a static version of libskia? I guess i can build it
from android source, but i don't want to build the whole android
source to get libskia.a.... Any advice?
Thanks a lot.
I guess i'am cleary doing something wrong, as the sample_app should
work without all the extra step i done? But i can't figure out how.
thanks for your response, however I target device prior to android
4.0.
I managed to build libskia.a for android by using skia revision 1236
(http://code.google.com/p/skia/source/detail?r=1236) with NDK r7
toolchain.
I wrote a sample app to draw onto a canvas with skia from JNI but
unfortunatly nothing is drawn. I have no crash and no error. Maybe I
am doing something wrong? I posted my java code and C code here :
http://pastie.org/private/lbh8w7421cuqoi1s0fcdyg and
http://pastie.org/private/sqnvllmirxbcgbtemyz8rw
The device I use for testing is using android 2.3.3
If you can have a look and let me know if you have any hint?
Thanks a lot.
On 6 déc, 14:11, Derek <djsol...@google.com> wrote:
> Check outhttp://code.google.com/p/skia/wiki/GettingStartedOnAndroid. The
make-standalone-toolchain.sh --platform=android-9
Thanks to your advice, i was able to compile skia using ndk standalone
toolchain. Now I trying to write a sample app that draw onto a canvas
but I can't figure out the right way to do this. I looked at the
sample app but the code is rather complex for me. Would you mind to
provide me a sample or some guidance to achieve this?
Thanks.
Elliot, nice tips about GM it contains a lot of information about skia
usage.
On 9 déc, 15:22, Derek Sollenberger <djsol...@google.com> wrote:
> The Skia's Android sample app is using an Android OpenGL Surface to render
> into. A simpler way of doing things is to render on the CPU using the
> NDK's ANativeWindow. To do that you need to create a Surface object in
> Java so that you can attach it to your UI, then using native_window_jni.h
> in the NDK you can convert the Surface to an ANativeWindow. Finally you
> can use the NDK to get access to the format/pixels of the ANativeWindow in
> order to construct an SkBitmap around that memory. Once you have an
> SkBitmap you can attach it to an SkCanvas and draw into it.
>
> ~ Derek
>
>
>
>
>
>
>
> On Fri, Dec 9, 2011 at 9:00 AM, Elliot Poger <epo...@google.com> wrote:
> > efyx-
>
> > You might want to check out the code in
> >http://code.google.com/p/skia/source/browse/trunk/gm. It may be easier
I'll post my code later if someone is looking for doing something
similar.
On 9 déc, 15:22, Derek Sollenberger <djsol...@google.com> wrote:
> The Skia's Android sample app is using an Android OpenGL Surface to render
> into. A simpler way of doing things is to render on the CPU using the
> NDK's ANativeWindow. To do that you need to create a Surface object in
> Java so that you can attach it to your UI, then using native_window_jni.h
> in the NDK you can convert the Surface to an ANativeWindow. Finally you
> can use the NDK to get access to the format/pixels of the ANativeWindow in
> order to construct an SkBitmap around that memory. Once you have an
> SkBitmap you can attach it to an SkCanvas and draw into it.
>
> ~ Derek
>
>
>
>
>
>
>
> On Fri, Dec 9, 2011 at 9:00 AM, Elliot Poger <epo...@google.com> wrote:
> > efyx-
>
> > You might want to check out the code in
> >http://code.google.com/p/skia/source/browse/trunk/gm. It may be easier
Hi efyx,Could you share the code? Many thanks!
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/skia-discuss/-/wIwt9wDehI8J.
Hi,
you can find a sample project here : http://efyx.io/android/TestSkia.zip it also contain a prebuild version of skia (revision 2839). In file Android.mk update path where your skia sources are and you can build the project, it should work.
I also put the code on pastie :Cheers.
- Java code TestSkia.java : http://pastie.org/3353672
- C++ code skiaJNI.cpp : http://pastie.org/3353674
On Fri, Feb 10, 2012 at 5:37 AM, Xingyun Lin <linxi...@gmail.com> wrote:
Hi efyx,Could you share the code? Many thanks!--To view this discussion on the web visit https://groups.google.com/d/msg/skia-discuss/-/wIwt9wDehI8J.
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group, send email to skia-discuss+unsubscribe@googlegroups.com.