-
Notifications
You must be signed in to change notification settings - Fork 6k
use SkMatrix.invert() instead of MatrixDecomposition to validate cache matrices #29530
use SkMatrix.invert() instead of MatrixDecomposition to validate cache matrices #29530
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Hmm, I forgot tests. Those should be quick. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, but we should also just delete the MatrixDecomposition files/tests, since these were the only usages.
done. |
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
…ate cache matrices (flutter/engine#29530)
* 422b15a Roll Skia from d9d9e21b311c to a8d38078a4f3 (1 revision) (flutter/engine#29521) * afe1c98 Roll Fuchsia Mac SDK from SfdmlzXiU... to nkHhPcy3q... (flutter/engine#29522) * b7f4651 Roll Fuchsia Linux SDK from 5-RB9TzQH... to m90mMA37b... (flutter/engine#29523) * 15d5a23 [Web] Fix BMP encoder (flutter/engine#29448) * 3f55aec Fix FlutterPresentInfo struct_size doc string (flutter/engine#29524) * b991af9 Roll Skia from a8d38078a4f3 to 7368c6d00b7c (5 revisions) (flutter/engine#29525) * 93666e2 Fix isolate_configuration typo (flutter/engine#29318) * 91033b9 Roll Skia from 7368c6d00b7c to a5030e9090e8 (3 revisions) (flutter/engine#29527) * c2090c2 [iOS] Make sure spawnee's isGpuDisabled is set correctly when FlutterEngine spawn (flutter/engine#29361) * e071f1d Roll Skia from a5030e9090e8 to 37afdbc22e89 (4 revisions) (flutter/engine#29528) * ca1710a Roll Skia from 37afdbc22e89 to a05d3029ac65 (4 revisions) (flutter/engine#29532) * 3364409 Reland Display Features support (Foldable and Cutout) (flutter/engine#29447) * 4684d23 [fuchsia] Add more logging for error cases. (flutter/engine#29397) * 5cf7c39 Remove D3D9 fallback path (flutter/engine#29533) * 98d31de [raster_cache] Increment access_count on Touch (flutter/engine#29529) * cc6fc4a Re-enable A11yTreeIsConsistent with higher timeout (flutter/engine#29367) * fb20916 Roll Skia from a05d3029ac65 to 37da672b14b7 (1 revision) (flutter/engine#29534) * d229ec8 use SkMatrix.invert() instead of MatrixDecomposition to validate cache matrices (flutter/engine#29530) * a92aebb Roll Clang Linux from 5N9a1nYj5... to UtjvZhwws... (flutter/engine#29535) * 47dab8a Roll Dart SDK from 3b11f88c96a5 to f38618d5d0c0 (7 revisions) (flutter/engine#29537) * 83ccad7 FragmentProgram constructed asynchronously (flutter/engine#29513) * 2078baf Roll Fuchsia Linux SDK from m90mMA37b... to Ci-Vji1rx... (flutter/engine#29546) * 6bf8093 Roll Fuchsia Mac SDK from nkHhPcy3q... to emi7COLIo... (flutter/engine#29547) * 290d179 Roll Skia from 37da672b14b7 to cf8daf79e710 (9 revisions) (flutter/engine#29548) * 197ca59 [iOS] Fixes press key message leaks (flutter/engine#29354) * 986b8d8 Roll Skia from cf8daf79e710 to ae67f07a58a2 (1 revision) (flutter/engine#29549) * 11010f0 Roll Skia from ae67f07a58a2 to 17616469ddf8 (1 revision) (flutter/engine#29551) * dadc7b2 Roll Skia from 17616469ddf8 to 4322c7fec7e4 (3 revisions) (flutter/engine#29552) * ed66091 don't build flutter SDK artifacts for armv7 (flutter/engine#28016) * 484cc5c Roll Dart SDK from f38618d5d0c0 to 05febe0a7860 (5 revisions) (flutter/engine#29539) * 387563a Roll Skia from 4322c7fec7e4 to 1800d410df16 (1 revision) (flutter/engine#29553) * 05ceba2 Roll Skia from 1800d410df16 to 725705f6630b (1 revision) (flutter/engine#29555) * 2b142ef Roll Dart SDK from 05febe0a7860 to 38e7078fa2b7 (5 revisions) (flutter/engine#29556) * 29da91f Roll Fuchsia Linux SDK from Ci-Vji1rx... to kHXT3xnTG... (flutter/engine#29557) * da02a4b Roll Fuchsia Mac SDK from emi7COLIo... to 6BYh8qaYo... (flutter/engine#29558) * 71fb575 Roll Skia from 725705f6630b to deb9386be146 (3 revisions) (flutter/engine#29559) * c5f572a [Linux keyboard] Fix logical keys of up events are not regularized (flutter/engine#29550) * 988ea43 Roll Dart SDK from 38e7078fa2b7 to d464cd3f2dc8 (5 revisions) (flutter/engine#29561) * fdee74d Trace calls to Canvas::saveLayer (flutter/engine#29444) * 953f718 ios test script checks for `ios_test_flutter` artifacts (flutter/engine#29554) * 145d890 Roll Skia from deb9386be146 to 37bef2d300e4 (6 revisions) (flutter/engine#29563) * cc9b174 Fix race condition introduced by background platform channels (flutter/engine#29377) * 79b5e3c Roll Dart SDK from d464cd3f2dc8 to 996ef242a2c9 (1 revision) (flutter/engine#29564) * 3eb6e15 fuchsia: Enable integration tests (flutter/engine#29565) * ffa8b25 Roll Skia from 37bef2d300e4 to 2417872a9993 (1 revision) (flutter/engine#29567) * 9af2de9 Roll Dart SDK from 996ef242a2c9 to 5ccf755b37a4 (1 revision) (flutter/engine#29568) * 16d6d18 Roll Fuchsia Linux SDK from kHXT3xnTG... to uP2kJIngK... (flutter/engine#29569) * 321bc56 Roll Fuchsia Mac SDK from 6BYh8qaYo... to W9UXc2Fwx... (flutter/engine#29570) * f0a8d4e Roll Dart SDK from 5ccf755b37a4 to f6a43e5eb71d (1 revision) (flutter/engine#29571) * 0be0303 Hide a11y elements when resigning active (flutter/engine#29566) * 9a3195a Roll Fuchsia Linux SDK from uP2kJIngK... to aD3d4Kqmy... (flutter/engine#29572) * b3cbee5 Roll Fuchsia Mac SDK from W9UXc2Fwx... to rIpW1050J... (flutter/engine#29573) * df686d2 Revert "Reland Display Features support (Foldable and Cutout) (#29447)" (flutter/engine#29574) * e812731 Revert dart to 38e7078fa2b7 (flutter/engine#29575) * 049074e Roll Skia from 2417872a9993 to cd7220e7686c (2 revisions) (flutter/engine#29577) * e6a51a4 Roll Fuchsia Mac SDK from rIpW1050J... to TOmxgL3av... (flutter/engine#29578) * 8f272d9 Roll Fuchsia Linux SDK from aD3d4Kqmy... to ZniYyCw7U... (flutter/engine#29579) * 469d6f1 Revert "[Web] Fix BMP encoder (#29448)" (flutter/engine#29580)
* 422b15a Roll Skia from d9d9e21b311c to a8d38078a4f3 (1 revision) (flutter/engine#29521) * afe1c98 Roll Fuchsia Mac SDK from SfdmlzXiU... to nkHhPcy3q... (flutter/engine#29522) * b7f4651 Roll Fuchsia Linux SDK from 5-RB9TzQH... to m90mMA37b... (flutter/engine#29523) * 15d5a23 [Web] Fix BMP encoder (flutter/engine#29448) * 3f55aec Fix FlutterPresentInfo struct_size doc string (flutter/engine#29524) * b991af9 Roll Skia from a8d38078a4f3 to 7368c6d00b7c (5 revisions) (flutter/engine#29525) * 93666e2 Fix isolate_configuration typo (flutter/engine#29318) * 91033b9 Roll Skia from 7368c6d00b7c to a5030e9090e8 (3 revisions) (flutter/engine#29527) * c2090c2 [iOS] Make sure spawnee's isGpuDisabled is set correctly when FlutterEngine spawn (flutter/engine#29361) * e071f1d Roll Skia from a5030e9090e8 to 37afdbc22e89 (4 revisions) (flutter/engine#29528) * ca1710a Roll Skia from 37afdbc22e89 to a05d3029ac65 (4 revisions) (flutter/engine#29532) * 3364409 Reland Display Features support (Foldable and Cutout) (flutter/engine#29447) * 4684d23 [fuchsia] Add more logging for error cases. (flutter/engine#29397) * 5cf7c39 Remove D3D9 fallback path (flutter/engine#29533) * 98d31de [raster_cache] Increment access_count on Touch (flutter/engine#29529) * cc6fc4a Re-enable A11yTreeIsConsistent with higher timeout (flutter/engine#29367) * fb20916 Roll Skia from a05d3029ac65 to 37da672b14b7 (1 revision) (flutter/engine#29534) * d229ec8 use SkMatrix.invert() instead of MatrixDecomposition to validate cache matrices (flutter/engine#29530) * a92aebb Roll Clang Linux from 5N9a1nYj5... to UtjvZhwws... (flutter/engine#29535) * 47dab8a Roll Dart SDK from 3b11f88c96a5 to f38618d5d0c0 (7 revisions) (flutter/engine#29537) * 83ccad7 FragmentProgram constructed asynchronously (flutter/engine#29513) * 2078baf Roll Fuchsia Linux SDK from m90mMA37b... to Ci-Vji1rx... (flutter/engine#29546) * 6bf8093 Roll Fuchsia Mac SDK from nkHhPcy3q... to emi7COLIo... (flutter/engine#29547) * 290d179 Roll Skia from 37da672b14b7 to cf8daf79e710 (9 revisions) (flutter/engine#29548) * 197ca59 [iOS] Fixes press key message leaks (flutter/engine#29354) * 986b8d8 Roll Skia from cf8daf79e710 to ae67f07a58a2 (1 revision) (flutter/engine#29549) * 11010f0 Roll Skia from ae67f07a58a2 to 17616469ddf8 (1 revision) (flutter/engine#29551) * dadc7b2 Roll Skia from 17616469ddf8 to 4322c7fec7e4 (3 revisions) (flutter/engine#29552) * ed66091 don't build flutter SDK artifacts for armv7 (flutter/engine#28016) * 484cc5c Roll Dart SDK from f38618d5d0c0 to 05febe0a7860 (5 revisions) (flutter/engine#29539) * 387563a Roll Skia from 4322c7fec7e4 to 1800d410df16 (1 revision) (flutter/engine#29553) * 05ceba2 Roll Skia from 1800d410df16 to 725705f6630b (1 revision) (flutter/engine#29555) * 2b142ef Roll Dart SDK from 05febe0a7860 to 38e7078fa2b7 (5 revisions) (flutter/engine#29556) * 29da91f Roll Fuchsia Linux SDK from Ci-Vji1rx... to kHXT3xnTG... (flutter/engine#29557) * da02a4b Roll Fuchsia Mac SDK from emi7COLIo... to 6BYh8qaYo... (flutter/engine#29558) * 71fb575 Roll Skia from 725705f6630b to deb9386be146 (3 revisions) (flutter/engine#29559) * c5f572a [Linux keyboard] Fix logical keys of up events are not regularized (flutter/engine#29550) * 988ea43 Roll Dart SDK from 38e7078fa2b7 to d464cd3f2dc8 (5 revisions) (flutter/engine#29561) * fdee74d Trace calls to Canvas::saveLayer (flutter/engine#29444) * 953f718 ios test script checks for `ios_test_flutter` artifacts (flutter/engine#29554) * 145d890 Roll Skia from deb9386be146 to 37bef2d300e4 (6 revisions) (flutter/engine#29563) * cc9b174 Fix race condition introduced by background platform channels (flutter/engine#29377) * 79b5e3c Roll Dart SDK from d464cd3f2dc8 to 996ef242a2c9 (1 revision) (flutter/engine#29564) * 3eb6e15 fuchsia: Enable integration tests (flutter/engine#29565) * ffa8b25 Roll Skia from 37bef2d300e4 to 2417872a9993 (1 revision) (flutter/engine#29567) * 9af2de9 Roll Dart SDK from 996ef242a2c9 to 5ccf755b37a4 (1 revision) (flutter/engine#29568) * 16d6d18 Roll Fuchsia Linux SDK from kHXT3xnTG... to uP2kJIngK... (flutter/engine#29569) * 321bc56 Roll Fuchsia Mac SDK from 6BYh8qaYo... to W9UXc2Fwx... (flutter/engine#29570) * f0a8d4e Roll Dart SDK from 5ccf755b37a4 to f6a43e5eb71d (1 revision) (flutter/engine#29571) * 0be0303 Hide a11y elements when resigning active (flutter/engine#29566) * 9a3195a Roll Fuchsia Linux SDK from uP2kJIngK... to aD3d4Kqmy... (flutter/engine#29572) * b3cbee5 Roll Fuchsia Mac SDK from W9UXc2Fwx... to rIpW1050J... (flutter/engine#29573) * df686d2 Revert "Reland Display Features support (Foldable and Cutout) (flutter#29447)" (flutter/engine#29574) * e812731 Revert dart to 38e7078fa2b7 (flutter/engine#29575) * 049074e Roll Skia from 2417872a9993 to cd7220e7686c (2 revisions) (flutter/engine#29577) * e6a51a4 Roll Fuchsia Mac SDK from rIpW1050J... to TOmxgL3av... (flutter/engine#29578) * 8f272d9 Roll Fuchsia Linux SDK from aD3d4Kqmy... to ZniYyCw7U... (flutter/engine#29579) * 469d6f1 Revert "[Web] Fix BMP encoder (flutter#29448)" (flutter/engine#29580)
Fixes: flutter/flutter#92962
It's a small gain, but the amount of math that happens in the MatrixDecomposition constructor compared to the amount of work required to test if the matrix is valid was just low hanging wasted fruit.
The improvement on average times to validate a picture cache entry went down by about 7% across the board. Less than a microsecond per call, but it's essentially a free fraction of a microsecond.