summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Galia Peycheva <galinap@google.com> 2021-09-02 14:25:16 +0200
committer Galia Peycheva <galinap@google.com> 2022-05-04 08:36:04 +0000
commit38cf61f7046592bb4f28b6ef537aa848ae9e3041 (patch)
treecfd4059fa3375fa221db429f6b6152904af1db80 /libs/androidfw/StringPool.cpp
parenta512a9b95584576d71bed77c34596d5267fcbf28 (diff)
Fix missing position updates to blur regions
The PositionUpdateListener sometimes gets called after the FrameDrawingCallback, because there is no ordering guarantee between these two callbacks. This causes the BlurRegions sent to SF to not have up-to-date positions. For example, an empty Rect gets sent as the blur region bounds, because the position update hasn't arrived when the surface transaction is sent. When the position update arrives it set the correct bounds, but it requires another draw to happen so that the correct position is picked up. This CL fixes this issue by saving the blur regions that were last sent to SF in FrameDrawingCallback and sending another transaction when the position update arrives. That transaction is merged into the previous one for the same frame, so the final transaction sent to SF has correct values. The CL also moves the FrameDrawingCallback registering logic entirely in the BlurAggregator in the first onPreDraw. This cleans up VRI Bug: 197239228 Test: atest --iterations 100 BlurTest#testBackgroundblurSimple Test: atest BlurAggregatorTest Change-Id: Ia122df40fdf2aa124299461c2e2597b61fa92699
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions