[cairo] Run Cairo with OpenGL ES 2 backend on Android
Henry (Yu) Song - SISA
henry.song at samsung.com
Tue Jun 25 07:22:32 PDT 2013
CAIRO_GL_COMPOSITOR=msaa is not a compile time setting. At runtime, cairo checks this setting.
Regarding to crash, can you send log?
From: Ngoc Dao [mailto:ngocdaothanh at gmail.com]
Sent: Tuesday, June 25, 2013 2:18 AM
To: Henry (Yu) Song - SISA
Cc: cairo at cairographics.org
Subject: Re: [cairo] Run Cairo with OpenGL ES 2 backend on Android
Thanks for the info.
I use Samsung Galaxy S3 (Android 4.0.2) and S3 alpha (Android 4.1.1).
I updated my code as you instructed:
Could you please check the code above to see if there's anything wrong?
It still crashes on S3 and slow (and nothing is shown on the screen) on S3 alpha.
On Tue, Jun 25, 2013 at 1:29 AM, Henry (Yu) Song - SISA <henry.song at samsung.com<mailto:henry.song at samsung.com>> wrote:
Which cairo git did you get cairogles from? At this moment, there are three gl compositors in cairo.
I don’t have android to test. If you give me some more info, I might be able to help you.
1. What is the GL driver on your android phone?
2. Does it support GL_IMG_multisampled_render_to_texture or GL_EXT_multisampled_render_to_texture extensions?
3. When you initialize EGL, do you use EGL_SAMPLES and EGL_SAMPLE_BUFFERS in configuration?
The reason I ask is that if you enable/or your driver supports MSAA, there is a faster GL compositor in cairo, called msaa compositor. The msaa compositor is being upstreamed at this moment, but not all of it has been upstreamed, about 20 patches left.
If you want to test with msaa compositor, please visit our branch in github - https://github.com/SRA-SiliconValley/cairogles, please pull release branch, it is synced with cairo-1.12.14.
When you run cairo, set env CAIRO_GL_COMPOSITOR=msaa, in addition, if your app is single-threaded or you have dedicated thread for GL rendering, please use cairo_gl_device_set_thread_aware (device, FALSE) to avoid unnecessary context switch.
If you want to try shadow/blur in cairo, please pull filters-wip branch. We have implemented Gaussian filter and drop shadow in that branch for both image and gl backends as well. Tests show our GL backend blur/shadow performance is very good, beat skia’s drawBlurLooper hands-down. Image-backend performance is not near as good as skia, due to slow performance on pixman bilinear sampling, at least on PC. If you have idea to improve, please feel free comment or send patches.
From: cairo-bounces+hsong=sisa.samsung.com at cairographics.org<mailto:sisa.samsung.com at cairographics.org> [mailto:cairo-bounces+hsong<mailto:cairo-bounces%2Bhsong>=sisa.samsung.com at cairographics.org<mailto:sisa.samsung.com at cairographics.org>] On Behalf Of Ngoc Dao
Sent: Wednesday, June 19, 2013 11:23 PM
To: cairo at cairographics.org<mailto:cairo at cairographics.org>
Subject: [cairo] Run Cairo with OpenGL ES 2 backend on Android
Have anyone tried to run Cairo with OpenGL ES 2 backend on Android? Is there any crash? How's the speed?
I've created a project here (branch master: image backend, cairogles branch: OpenGL ES 2 backend):
Some basic results from the project above:
OpenGL ES 2 backend:
* Crashes on Android 2.3, 4.0.2 etc. with shader compilation problem
* Doesn't crash on Android 4.1.1, but very very slow, 0.5 FPS/s
Image backend is stable but slow, 12 FPS/s.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo