servo/components
bors-servo 48c715c1c8 Auto merge of #18966 - chenpighead:Bug1399049-transform-animate-refactoring, r=hiikezoe
stylo: Avoid using InterpolateMatrix as a fallback for matched transform function pair

In the current implementation, if there is any interpolation error in a matched
transform function pair, we fall-back to use InterpolateMatrix unconditionally.
However, the error could be caused by:

1. mismatched transform function pair
2. matched transform function pair within at least one undecomposable matrix.

Using InterpolateMatrix for case 1 makes sense, however, using InterpolateMatrix
for case 2 does not. According to the spec, we should just report error for
case 2, and let the caller do the fallback procedure. Using InterpolateMatrix
for case 2 will go through more unnecessary code path, and produce more memory
usage and calculation cost, which should be avoidable.

In this patch, we add an extra pass to check if a transform function pair have
matched operations in advance. With this information, we can easily tell whether
the interpolation error in a equal-length transform function pair is caused by
case 1 or case 2. So, we can avoid the unnecessary cost.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1399049](https://bugzilla.mozilla.org/show_bug.cgi?id=1399049)
- [X] These changes do not require tests because the change is for some performance gain, and we have tests to ensure that we won't regress the existing behavior already.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18966)
<!-- Reviewable:end -->
2017-10-21 01:39:41 -05:00
..
allocator Stop relying on linking details of std’s default allocator 2017-10-19 09:52:50 +02:00
atoms Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
bluetooth Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE 2017-10-19 21:26:51 +00:00
bluetooth_traits Update WR (details below): 2017-10-16 16:33:24 +10:00
canvas Auto merge of #18592 - MortimerGoro:dom_texture, r=jdm 2017-10-16 15:36:42 -05:00
canvas_traits Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
compositing Use WebRender to compute text index on click events 2017-10-18 09:15:55 +02:00
config Fix commonmark Markdown warnings in docs, part 1 2017-10-17 11:24:57 -07:00
constellation Auto merge of #18704 - mrobinson:wr-hit-testing, r=jdm,glennw,mbrubeck 2017-10-17 17:09:25 -05:00
debugger
deny_public_fields deny_public_fields: display field identifier in help message 2017-06-25 18:12:43 +01:00
devtools Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE 2017-10-19 21:26:51 +00:00
devtools_traits Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE 2017-10-19 21:26:51 +00:00
dom_struct Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
domobject_derive Fix quote dependency version 2017-08-23 18:35:42 +02:00
fallible Bug 1400754 - stylo: crash on Win64 Asan build. r=manishearth, dmajor. 2017-10-02 20:53:23 +02:00
geometry Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
gfx Auto merge of #18956 - glennw:update-wr-ellipse-bs, r=jdm 2017-10-20 16:47:30 -05:00
gfx_traits Auto merge of #18921 - mrobinson:incremental-stacking-context-ids, r=emilio 2017-10-18 21:34:23 -05:00
hashglobe Include map length in diagnostics 2017-10-20 16:31:42 -07:00
jstraceable_derive Fix quote dependency version 2017-08-23 18:35:42 +02:00
layout Auto merge of #18956 - glennw:update-wr-ellipse-bs, r=jdm 2017-10-20 16:47:30 -05:00
layout_thread Auto merge of #18946 - cynicaldevil:update-h5e, r=nox 2017-10-20 08:49:09 -05:00
layout_traits Update WR (details below): 2017-10-16 16:33:24 +10:00
lru_cache Hoist lookup() into lru_cache. 2017-09-20 23:22:33 -07:00
malloc_size_of Auto merge of #18946 - cynicaldevil:update-h5e, r=nox 2017-10-20 08:49:09 -05:00
malloc_size_of_derive Overhaul MallocSizeOf and related things. 2017-09-12 12:37:51 +10:00
metrics Update WR (details below): 2017-10-16 16:33:24 +10:00
msg Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE 2017-10-19 21:26:51 +00:00
net Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
net_traits Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
nonzero Replace NonZeroU32 and NonZeroUsize with a generic NonZero 2017-10-16 20:19:19 +02:00
profile Stop relying on linking details of std’s default allocator 2017-10-19 09:52:50 +02:00
profile_traits Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
rand
range Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
remutex Replace NonZeroU32 and NonZeroUsize with a generic NonZero 2017-10-16 20:19:19 +02:00
script Auto merge of #18957 - mhaessig:fire-mouse-event-enum, r=jdm 2017-10-20 22:14:43 -05:00
script_layout_interface Auto merge of #18946 - cynicaldevil:update-h5e, r=nox 2017-10-20 08:49:09 -05:00
script_plugins Remove usage of unstable box syntax, except in the script crate 2017-10-12 12:10:56 +02:00
script_traits Auto merge of #18933 - mrobinson:wr-text-index, r=jdm 2017-10-19 02:36:32 -05:00
selectors Implement XUL tree pseudo style resolution for stylo. 2017-10-20 14:08:56 +11:00
servo Update WR (hit test relative point, query feature) 2017-10-17 13:42:35 +10:00
servo_arc Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
size_of_test
style Auto merge of #18966 - chenpighead:Bug1399049-transform-animate-refactoring, r=hiikezoe 2017-10-21 01:39:41 -05:00
style_derive style: Remove HasViewportPercentage. 2017-08-29 23:51:21 +02:00
style_traits Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE 2017-10-19 21:26:51 +00:00
url Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
webdriver_server Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE 2017-10-19 21:26:51 +00:00
webvr Update WR (details below): 2017-10-16 16:33:24 +10:00
webvr_traits Update WR (details below): 2017-10-16 16:33:24 +10:00