Fix unnecessary invalidation and redraws on Desktop#2628
Conversation
MatkovIvan
left a comment
There was a problem hiding this comment.
It seems it should fix an ignored desktop test. Please try to re-enable it c8df3ad
If it fixes some different case, It's better to write additional unit test
094dc57 to
600b2b4
Compare
|
If this does fix CMP-9385, it's probably incidental because even if something invalidates compose (in addition to This bug (CMP-9399) is about a single invalidation that's happening when there should be none; not about two |
|
The test itself seems to be fixed by this update so I think we can count CMP-9385 as fixed. However, because rulers have been implemented since before merging 1.11.0-alpha01 and the test only started failing after the merge, we discussed with @m-sasha that there might be another issue which needs investigating. I suggest we proceed with this partial fix if possible and continue investigating as part of a new related task. |
| val width = placeable.width | ||
| val height = placeable.height | ||
| return layout(width, height, rulers = rulerLambda) { placeable.place(0, 0) } | ||
| return layout(width, height, rulers = rulerLambda(width, height)) { placeable.place(0, 0) } |
|
I wonder if it's possible to add a unit test to make sure there's no invalidation. |
Fixes unnecessary invalidation and redraws on Desktop caused by WindowInsetsRulers
Fixes CMP-9399 WindowInsetsRulers cause invalidations on Desktop
Fixes CMP-9385 Fix Desktop ApplicationTest after merging 1.11.0-alpha01
Testing
onGloballyPositioned is not called repeatedly with same position on screenno longer ignoredThis should be tested by QA
Release Notes
Fixes - Desktop
WindowInsetsRulersimplementation usingRulerScope.coordinates.size