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

Skip to content
Commit df8166e6 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Use a flag to determine isRenderable

Rely on whether the GraphicBuffer has GRALLOC_USAGE_HW_RENDER to
determine whether to treat it as a potential output buffer, rather than
whether the client intends to write to it.

This speculatively fixes a crash where a GraphicBuffer is stored in
SkiaRenderEngine's cache without being considered writable, and then
a later call attempts to pull it out of the cache to use as output.

In practice, this means that when importing the GraphicBuffer as a
backend texture in Skia, Skia will treat it as though it might be an
output buffer, even if we are only going to sample from it. This should
not have an effect on sampling performance.

Like I859c6b9ecabfb27151c6a45157ffd7c92cb54275 but basing the behavior
change on a flag. A rebased version of that CL will later remove the
extra parameter.

Bug: 305445199
Test: librenderengine_test
Change-Id: I6c436b6b80b27930d82aabf22107216172773b56
parent 10c62934
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