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

Skip to content
Commit 4616ea8c authored by tazhang's avatar tazhang Committed by Gerrit - the friendly Code Review server
Browse files

Fix HWUI Path Cache dangling pointer

When precache, PathTexture is added to PathCache, and it is released
after drawn if we want to clean it. But the PathCache LRU still
holds the entry of the PathTexture object. When trim the cache in
the end of each frame, LRU finds that its mListener is not NULL and
invoke the functor, however, mListener points to the released
PathTexture object and is a dangling pointer, thus leads to crash.
Smart pointer don't help here since they only manage scopes, while
PathTexture is also controled by its cleanup field.

The fix is to also remove the LRU entry of PathTexture*, it will
also release the texture object and there won't be texture leaks.

Change-Id: Iaa0621df5dc71532e9e75b38ad94384353930b95
parent 6f785860
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment