skia2/modules/skottie/src
Florin Malita 6a2a637746 [skottie] Fix Keyframe::Value equality operator
Per spec, reading anything other than the most recently written
union member is undefined behavior.

Keyframe containers always access the same member, consistently.  But
the type-agnostic equality operator does touch both members.

Refactor to avoid undefined behavior.

Also add a couple of unit tests to capture keyframe deduping behavior
(which in turn relies on the equality operator).

Change-Id: I7ba9c335ef28af7ddc71bd6f03d56b891fbdea1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/451016
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-09-21 19:23:26 +00:00
..
animator [skottie] Fix Keyframe::Value equality operator 2021-09-21 19:23:26 +00:00
effects Convert internal SkSL to use .eval() 2021-09-03 15:54:54 +00:00
layers Expanded PropertyObserver interface to include Node Type 2021-06-11 17:00:47 +00:00
text Reland "[skottie] AllCaps support" 2021-09-03 14:43:59 +00:00
Adapter.h [skottie] Cleanup: split animators into separate CUs 2020-03-17 15:48:17 +00:00
Camera.cpp Move Sk3Perspective and Sk3Lookat into SkM44 2021-03-24 15:47:22 +00:00
Camera.h [skottie] Switch SkMatrix44 -> SkM44 2020-01-27 21:42:56 +00:00
Composition.cpp move SkTPin to include/private 2020-10-16 19:45:11 +00:00
Composition.h Reland "[skottie] Reduce CompositionBuilder stack footprint" 2020-09-24 21:36:29 +00:00
Layer.cpp [skottie] Suppress layer parser errors for tt: 0 2021-09-08 16:04:01 +00:00
Layer.h Fix CanvasKit warnings compiling on Mac with emsdk 2.0.0 2020-09-18 20:35:12 +00:00
Path.cpp [skottie] Vector-encoded paths 2020-04-01 17:06:04 +00:00
Skottie.cpp Support expressions for scalar values 2021-08-05 22:42:04 +00:00
SkottieJson.cpp [skottie] Cleanup pass 2020-04-02 17:23:28 +00:00
SkottieJson.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkottiePriv.h Support expressions for scalar values 2021-08-05 22:42:04 +00:00
SkottieProperty.cpp Reland "[skottie] AllCaps support" 2021-09-03 14:43:59 +00:00
SkottieTest.cpp Reland "[skottie] AllCaps support" 2021-09-03 14:43:59 +00:00
SkottieTool.cpp Use thread_local on iOS 2021-09-20 17:51:38 +00:00
SkottieValue.h [skottie] Cleanup pass 2020-04-02 17:23:28 +00:00
Transform.cpp [skottie] Implement skew & skew axis support 2021-02-08 22:24:38 +00:00
Transform.h [skottie] Layer auto-orient support 2020-05-25 16:19:23 +00:00