when I use skia on android, I get symbol conflict

149 views
Skip to first unread message

陈国栋

unread,
Mar 4, 2017, 11:35:29 PM3/4/17
to skia-discuss
I am making a engine to do some drawing. And it will  cross ios, android, windows plateform.

so I select skia and cpp as basement. 

but for android. I use NDK and JNI to call c++ function form java code.

And android is already embed skia library which has different version and different api interface on different android system version.

so I must be build myself skia version and link it. 

But android app has build it itself skia version. when I load my so which link myself skia version. will be symbol conflict.


so how can I do with it ? 

Matthew Leibowitz

unread,
Mar 13, 2017, 10:31:54 PM3/13/17
to skia-discuss
You may be using C++, but you can check out the bits on the mono fork and project SkiaSharp where we have a cross-platform drawing for iOS/tvOS/Android/Mac/Linux/Windows/UWP:

https://github.com/mono/skia (our skia fork - almost no changes, just the build bits)

I am working on a new script for GN and m57: https://github.com/mono/SkiaSharp/blob/update-m57/cake/BuildExternals.cake This is still in progress and only iOS/tvOS/macOS/Android builds, and the other platforms won't even start yet. Should be done soon.

陈国栋

unread,
Mar 13, 2017, 11:48:46 PM3/13/17
to skia-d...@googlegroups.com
Ok  thanks.  do  you  use  GPU render ?skia  is  slowly  when  I draw  something on  ios  plateform.  now screen is  so much  pixels must  be  shader.  It  is performance bad.

Matthew Leibowitz <mattl...@live.com>于2017年3月14日 周二上午10:31写道:
--
You received this message because you are subscribed to a topic in the Google Groups "skia-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/skia-discuss/EbpAbnKiX6A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.

Matthew Leibowitz

unread,
Mar 14, 2017, 12:29:12 AM3/14/17
to skia-discuss
We do both. basically, you set up you GL context as if you were going to do normal GL - you could use a GLKView, and then in the DrawInRect method, just create your GrGLInterface and GrGLContext.

This is my view, it is C#, but should translate:
Message has been deleted

陈国栋

unread,
Mar 14, 2017, 2:02:41 AM3/14/17
to skia-discuss
is this will be accelerate render? I just know that vector  graphic is hard to accelerate?  can be 60 fps? 

在 2017年3月14日星期二 UTC+8下午12:29:12,Matthew Leibowitz写道:

陈国栋

unread,
Mar 18, 2017, 12:09:49 AM3/18/17
to skia-discuss
I hava try use gl backend.  code like that:

GrContext* context = GrContext::Create(
        kOpenGL_GrBackend, (GrBackendContext)interface);
    if (premul_alpha_) {
        surface_ = SkSurface::MakeRenderTarget(context,
            SkBudgeted::kNo, SkImageInfo::Make(size_.width_,
                size_.height_, kN32_SkColorType, kPremul_SkAlphaType));
    } else {
        surface_ = SkSurface::MakeRenderTarget(context,
            SkBudgeted::kNo, SkImageInfo::Make(size_.width_,
                size_.height_, kN32_SkColorType, kUnpremul_SkAlphaType));
    }

but it crash at "GrContext::Create", I was build on Mac OS. If I shoud link some opengl lib? 

在 2017年3月14日星期二 UTC+8下午12:29:12,Matthew Leibowitz写道:
We do both. basically, you set up you GL context as if you were going to do normal GL - you could use a GLKView, and then in the DrawInRect method, just create your GrGLInterface and GrGLContext.
Reply all
Reply to author
Forward
0 new messages