mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-29 21:25:35 +00:00
90986d4597
In order to test off-main thread animations, we have a method that will return the animated transform value set on a shadow layer. This method will return null if the transform was not set by animation. However, in some situations we temporarily clear the animation transform. For example, when we synchronize a composite layer with its content layer, we reset the animation transform. Then, on the next composite, we will recalculate the animated value. If we try to query the animated transform value in between resetting it and the next composite we will get back null. To avoid a race condition, in ShadowLayersUpdated after potentially clearing the animated transform, we synchronously update the async properties on the layer transform in order to reinstate the animated transform (so it is there when we go to query it). However we *only* do this when the mIsTesting flag is set which is true whenever we have the refresh driver under test control. Furthermore, we only do it when we already have a pending composite task to better match conditions under regular operation. In test_deferred_start.html, however, we specifically need to test without putting the refresh driver under test control. As a result mIsTesting will be false and we can encounter a race condition when querying the animated transform. To work around this, this patch makes us *also* update async properties when fetching the animated transform value. The method for getting the animated transform value is only used for testing so it should have no effect on the regular compositing behavior. It would seem that we could then remove the call from ShadowLayersUpdated but doing this caused a small number of test cases to fail. In particular one test for *opacity* in test_animations_omta.html was failing at the end of the animation because we ended up with a stale opacity animation value on the compositor which the synchronous update was previously removing. The test, in this case, should be ignoring the value on the compositor but, unlike transform, there is no flag for indicating whether or not the opacity on shadow layers has been set by animations. As a result, this patch leaves the call that triggers a synchronous update in test mode when updating shadow layers. |
||
---|---|---|
.. | ||
2d | ||
angle | ||
cairo | ||
doc | ||
gl | ||
graphite2 | ||
harfbuzz | ||
ipc | ||
layers | ||
ots | ||
qcms | ||
skia | ||
src | ||
tests | ||
thebes | ||
ycbcr | ||
moz.build |