mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Anti-alias rounded borders on overflow: hidden views
Summary: When a view is rendered with a combination of `overflow: hidden` and `borderRadius: >0`, the `ReactViewGroup` would apply the border radius using Canvas `clipPath`. In Android graphics, clipPath is not an anti-aliased operation and caused aliasing artifacts. Changing the method to a bitmask using the `PorterDuff` method results in the same functionality, but with hardware accelerated antialiasing. https://github.com/facebook/react-native/issues/24486 Changelog: [Android][Change] - Views with overflow: hidden and borderRadius: >0 now render anti-aliased borders. Reviewed By: javache Differential Revision: D38914878 fbshipit-source-id: 45ac7e4aece7a76c4216412175e49d3d73b6f391
This commit is contained in:
committed by
Facebook GitHub Bot
parent
18542b6ef5
commit
7708cdccef
@@ -144,4 +144,10 @@ public class ReactFeatureFlags {
|
||||
|
||||
/** Temporary flag to allow execution of mount items up to 15ms earlier than normal. */
|
||||
public static boolean enableEarlyScheduledMountItemExecution = false;
|
||||
|
||||
/**
|
||||
* Use a bitmap mask instead of clipPath for rounding corners so that they are antialiased in
|
||||
* Android
|
||||
*/
|
||||
public static boolean antiAliasRoundedOverflowCorners = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user