Bug 83878 - Stop using cairo-egl in demo apps
Summary: Stop using cairo-egl in demo apps
Status: NEW
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-15 10:35 UTC by Pekka Paalanen
Modified: 2014-09-15 10:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pekka Paalanen 2014-09-15 10:35:17 UTC
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.


bug/show.html.tmpl processed on Mar 27, 2017 at 12:39:59.
(provided by the Example extension).