Commit ca2fc14
Fix mask-based clipping for < API 27 (#54914)
Summary:
Pull Request resolved: #54914
The previous implementation for path clipping on API 27 would only attempt to draw a clipping mask within the bounds of the inner content, applying anti-aliasing to the edge of that padding box path. However, it would neglect to account for outlines, resulting in drawing inner contents *outside* the boundary of the box.
This change inverts the logic by applying a mask to the entire content boundary and using DST_OUT to "delete" content outside of the padding box, while also still honoring the padding box path and its anti-aliasing
Changelog: [Internal]
Reviewed By: haixia-meta
Differential Revision: D89324397
fbshipit-source-id: 1261d8500f44545445ff12e8e21412498fd4d0401 parent df9d31b commit ca2fc14
1 file changed
Lines changed: 11 additions & 4 deletions
File tree
- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
583 | | - | |
584 | 583 | | |
585 | 584 | | |
586 | | - | |
587 | 585 | | |
588 | 586 | | |
589 | 587 | | |
| 588 | + | |
590 | 589 | | |
591 | 590 | | |
| 591 | + | |
592 | 592 | | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
593 | 601 | | |
| 602 | + | |
594 | 603 | | |
595 | 604 | | |
596 | | - | |
597 | | - | |
598 | 605 | | |
599 | 606 | | |
600 | 607 | | |
| |||
0 commit comments