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

Skip to content
Commit 8ef7e144 authored by Nolan Scobie's avatar Nolan Scobie
Browse files

Rework how RenderEngine and SurfaceFlinger include Skia

This is in preparation for including Perfetto in Skia, see
go/skia-perfetto-android (excerpt below)

librenderengine includes Skia via whole_static_libs:
["libskia_renderengine"], which scoops everything out of
libskia_renderengine and plops it into librenderengine, including
any of Skia's dependencies. It seems that if another target (e.g.
SurfaceFlinger) includes both Perfetto (on its own) and librenderengine
(which would now transitively include Perfetto by way of Skia), there
will be a conflict.

Per b/169779783, a common workaround for this dependency conflict would
be to switch from whole_static_libs to static_libs:
["libskia_renderengine"] in librenderengine (which won't include Skia's
dependencies), and then separately include Skia's dependencies into
librenderengine by using defaults: ["skia_renderengine_deps"]. This has
the effect of not propagating them further.

Then, downstream users of libskia_renderengine (e.g. SurfaceFlinger)
that previously accessed Skia APIs directly from their inclusion of
librenderengine (since librenderengine included Skia via
whole_static_libs) would have to both pull in their own reference to Skia (via static_libs) and Skia's dependencies (via defaults). These two requirements have been simplified by the addition of cc_defaults:
librenderengine_deps, which can be used to pull in both at the same
time.

Bug: 259248961
Test: presubmits (builds)
Change-Id: I46750a0336a29d8d32ad2cb79a71c90461272fce
parent fc55603a
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