[waffle] [PATCH] Enabling Waffle library for Android.

Chad Versace chad.versace at linux.intel.com
Wed Aug 29 23:02:05 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for incorporating the requested changes. I just commited the patch to
master. I made a few cleanups to the patch, which I noted in the commit
message. The code is nearly identical to your original patch, except that I
had to rename some symbols to avoid namespace conflicts with the Android platform.

On 08/20/2012 04:54 AM, Juha-Pekka Heikkilä wrote:
> Another week, another version for Android patch for Waffle. Again in the 
> attachment.
> 
> I did do some restructuring of my code to try to get the multiple window 
> system working for Android but alas it seems this was useless work for 
> now.
> 
> Display now contain pointer to reach control over SurfaceComposerClient 
> which is one per process type object, trying to initialize this for second 
> time in one process will segfault the calling process. Apparently this has 
> been so since Gingerbread, at least according to some googling I did.
> 
> Window has pointer for SurfaceControl, creating many windowses would create
> many SurfaceControl objects allowing them to be independent from each
> other. Alas it seems for one SurfaceComposerClient one can only create
> single SurfaceControl object, creating second did make everything unstable.
> After creating second SurfaceControl accessing either SurfaceControl will
> segfault or freeze inside calling method. Once I notice this I tried it
> with simple piece of code which just create composer client and two surface
> controls to get the same behaviour as with when doing this with Waffle thus
> unless there is something I did totally miss it seems one process can only
> have one surface in Android for now. There is the video player which has
> the special secondary layer where the video is playing and I did not yet
> see how does it do it but I suspect layer for video is flagged to be
> special.
> 
> With the surfaces I also found behaviour which was not very nice. After I 
> destroy the surface and clean everything related to it to create a new 
> surface I get same errors as if I was creating second surface with the 
> first one still there giving me a segfault. To get the new surface there is
> a need for a new composer client which again is one per process.

It's unfortunate that the Android framework behaves badly. I guess we'll just
have to live those bugs until someone fixes them upstream.

> The patch will compile for JB by default. If one is compiling against ICS 
> there is a need to add definition for 'BUILD_FOR_ICS'. This define will 
> switch one include folder.

By the way, in a follow-up patch I added some makefile magic to auto-detect if
you're building for ICS or JB. It's no longer necessary to manually add CFLAGS
for ICS.

Thanks,
Chad
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQPwHcAAoJEAIvNt057x8i9N8P/ioEIZ9lUqbqFNxSWdH61tkR
jP0C/RMs11Sa8ToFYFew/dSpBjHvrh8arQRvwPM0sblCMMrAjyrnsHefD1uV9QQh
YWOSucxKIE7jxOQDbsvZ1cFru1cWw6AeF/nDpwA0DV/PcD3Zx+9gifB5jccbsjrq
1zGS17SPzXMzxjs3jFe3qwOQyJa/ijKTzF0UOGOfxxkgoGLs9InTXEqrjl0dFzY/
hBwZAmBjy5QbO/rWr7YlsClVGHTARF08EVlVfEnU9o/JHvPSChhvfxkAai2iNOqt
mTv8477hkhQW552EKwrYT78jkWl9N5hpLZzk7GHzXa29+Xwm+Q2nwHj5CHZ4joaS
1TEEeVJobjGD3BO/kCVk6ThrT4CtMJjLaT+7UKIn5tcHRnlcFIJ276+fhjc/WYXn
h8KmqE347Jy4/y7nfAOIZ9xoFwzV7naF89nQ7LcufTNiHYPVBVw44WVUNjnXKZcl
5S5fqSRbgoj5UA/2FGcP2bi1fufIzCiicwaVgts5KmI9MkWhNbufciX22+QgO3J3
AKaGiukzfI2Jw+pSvzoz0DadPO92D0N8pZIw2TKjOpdp1odVJmgQRhneoJ7+siA3
2qtyZOa0Z5cromJ6ZbVg6o94RLpIvMdcUO9ILvz/qzzXljB0xl5ZJWQ2SQe3ZE5A
H5upDpaTyYbZ9C+HTSAM
=vU7/
-----END PGP SIGNATURE-----


More information about the waffle mailing list