[cairo] Run Cairo with OpenGL ES 2 backend on Android
Henry (Yu) Song - SISA
henry.song at samsung.com
Mon Jun 24 09:29:22 PDT 2013
Hi, Ngoc
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.
Henry
From: cairo-bounces+hsong=sisa.samsung.com at cairographics.org [mailto:cairo-bounces+hsong=sisa.samsung.com at cairographics.org] On Behalf Of Ngoc Dao
Sent: Wednesday, June 19, 2013 11:23 PM
To: cairo at cairographics.org
Subject: [cairo] Run Cairo with OpenGL ES 2 backend on Android
Hi.
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):
https://github.com/ngocdaothanh/jsg
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.
Ngoc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130624/71ed2888/attachment.html>
More information about the cairo
mailing list