Currently, the toytoolkit uses cairo-egl if it is available, which means it will create an OpenGL or GLES context for Cairo drawing. This is wasteful, and at least I recommend people to build Weston with --with-cairo=image anyway.
However, we have a few demos, that depend on cairo-gl or cairo-glesv2, and at least one demo, which cannot run with cairo-gl because it directly uses GLESv2. (Linking both GL and GLES into the same process is a bad idea.)
The demo apps that currently require cairo-egl (that is, cairo-gl or cairo-glesv2), should be modified to not rely on Cairo for GL(ES).
A demo app, that used GL or GLES for rendering, should get the decorations from toytoolkit as images, upload them to GL textures, and compose them into the window. Obviously this is code that can be shared between many demo apps, but it should not be in toytoolkit (window.c). It needs to be separate, so that the toytoolkit does not pull in any EGL or GL libraries. Choosing the flavor of GL must be up to the app.
Once this works correctly, using --with-cairo=image will not exclude any demo apps from the build like it does now.
This would be a good project for someone new to get familiar with the demo code.