Skip to content
Commit 204d0482 authored by Stephen Nusko's avatar Stephen Nusko Committed by Chromium LUCI CQ
Browse files

Handle animations calling onImageAvailable multiple times.

Actually fix the crash by handling the fact that animations can cause
onImageAvailable to be called multiple times (previously we thought 1
draw equaled 1 onImageAvailable). Due to someone giving us a way to repo
the crash I was able to determine that when a user clicks the toolbar we
preform a ripple animation. We take a screenshot (in hardware or
software mode), but I had baked in the assumption that onImageAvailable
would only be called once per requestDraw(). This is incorrect so
instead we now ignore calls after. This more closely replicates the
software draw behaviour.

A future optimization would be to not request a new bitmap when we are
just doing an animation. In my tests we already had a bitmap before the
animation that would have worked.

Bug: 1185197,1186567,b:170620133
Change-Id: I8ee1adea1057fe7216693a6c6f3cde588fa29d69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2773198


Auto-Submit: Stephen Nusko <nuskos@chromium.org>
Commit-Queue: David Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#864687}
parent 6cf1f2bc
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