Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fce264d5 authored by Josh Guilfoyle's avatar Josh Guilfoyle Committed by Josh Guilfoyle
Browse files

Introduced an asset redirection system to the theme engine.

Previously, the theme engine required careful redirection of only the
highest-level "theme" style element, relying then on the theme attribute
lookups to satisfy the demands of all themeable apps.  This approach
created significant challenges which required, in some cases, heavy
modification for existing applications to support the engine.  Custom
widgets and themed components required special theme support in order to
be reachable by the style engine alone.  Similarly, a number of clumsy
hacks were required around the framework to support certain components
such as menus and tab widgets.

The asset redirection system allows the theme to specify a redirection
table which is consulted for nearly all final resource resolutions.
This essentially means that once the theme is applied, any original
resource being redirected would no longer be accessible by the
AssetManager, instead being redirected to the matching resource in the
theme itself.

In order for this to function efficiently it is necessary to create
cache files mapping resource integers from one package to another, even
if those integers will change across releases.  For this, one-time name
to integer conversions occur, with the results written in a data
format suitable for efficient reads for each AssetManager created.
Currently this format must be parsed and cannot be directly mmaped
though this will be addressed in future commits.

Change-Id: Ie36e74314c600a72e03e568675a38801b7acd1ee
parent 238a60da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment