diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java index db3dd2871cc6..82a10ecce942 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java @@ -143,6 +143,7 @@ public BaseViewManager(@Nullable ReactApplicationContext reactContext) { view.setTag(R.id.use_hardware_layer, null); view.setTag(R.id.filter, null); + view.setTag(R.id.backdrop_filter, null); view.setTag(R.id.mix_blend_mode, null); LayerEffectsHelper.apply(view, null, null); @@ -268,6 +269,15 @@ public void setFilter(@NonNull T view, @Nullable ReadableArray filter) { view.setTag(R.id.filter, filter); } + @ReactProp(name = ViewProps.BACKDROP_FILTER, customType = "Filter") + public void setBackdropFilter(@NonNull T view, @Nullable ReadableArray backdropFilter) { + view.setTag(R.id.backdrop_filter, backdropFilter); + view.invalidate(); + if (view.getParent() instanceof View) { + ((View) view.getParent()).invalidate(); + } + } + @ReactProp(name = ViewProps.MIX_BLEND_MODE) public void setMixBlendMode(@NonNull T view, @Nullable String mixBlendMode) { view.setTag(R.id.mix_blend_mode, BlendModeHelper.parseMixBlendMode(mixBlendMode)); diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.kt index fb4ca1ad6ea4..570d3b58d237 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.kt @@ -87,6 +87,8 @@ public abstract class BaseViewManagerDelegate< ViewProps.FILTER -> mViewManager.setFilter(view, value as ReadableArray?) + ViewProps.BACKDROP_FILTER -> mViewManager.setBackdropFilter(view, value as ReadableArray?) + ViewProps.MIX_BLEND_MODE -> mViewManager.setMixBlendMode(view, value as String?) ViewProps.SHADOW_COLOR -> diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/FilterHelper.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/FilterHelper.kt index 7eb0f4378e6f..0c3cccf9ff22 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/FilterHelper.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/FilterHelper.kt @@ -117,15 +117,18 @@ internal object FilterHelper { // https://www.w3.org/TR/filter-effects-1/#blurEquivalent fun createBlurEffect(sigma: Float, chainedEffects: RenderEffect? = null): RenderEffect? { - if (sigma <= 0.5) { + // RenderEffect.createBlurEffect takes sigma (standard deviation) directly — it passes + // through to Skia's SkImageFilters::Blur(sigmaX, sigmaY). Convert dp→px here; do NOT + // apply sigmaToRadius (that formula is for HWUI's box-filter BlurMaskFilter, not RenderEffect). + val pxSigma = PixelUtil.toPixelFromDIP(sigma) + if (pxSigma <= 0.5f) { return null } - val radius: Float = sigmaToRadius(sigma) return if (chainedEffects == null) { - RenderEffect.createBlurEffect(radius, radius, Shader.TileMode.DECAL) + RenderEffect.createBlurEffect(pxSigma, pxSigma, Shader.TileMode.DECAL) } else { - RenderEffect.createBlurEffect(radius, radius, chainedEffects, Shader.TileMode.DECAL) + RenderEffect.createBlurEffect(pxSigma, pxSigma, chainedEffects, Shader.TileMode.DECAL) } } @@ -199,7 +202,7 @@ internal object FilterHelper { val color: Int = if (filterValues.hasKey("color")) filterValues.getInt("color") else Color.BLACK val radius: Float = if (filterValues.hasKey("standardDeviation")) - sigmaToRadius(filterValues.getDouble("standardDeviation").toFloat()) + PixelUtil.toPixelFromDIP(filterValues.getDouble("standardDeviation").toFloat()) else 0f return createDropShadowEffect(offsetX, offsetY, radius, color, chainedEffects) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.kt index 3ded0d07c3a2..1d5506594529 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.kt @@ -155,6 +155,7 @@ public object ViewProps { public const val BORDER_START_COLOR: String = "borderStartColor" public const val BORDER_END_COLOR: String = "borderEndColor" public const val BOX_SHADOW: String = "boxShadow" + public const val BACKDROP_FILTER: String = "backdropFilter" public const val FILTER: String = "filter" public const val MIX_BLEND_MODE: String = "mixBlendMode" public const val OUTLINE_COLOR: String = "outlineColor" diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/BackdropFilterHelper.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/BackdropFilterHelper.kt new file mode 100644 index 000000000000..8029ff9305a7 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/BackdropFilterHelper.kt @@ -0,0 +1,110 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.react.views.view + +import android.annotation.SuppressLint +import android.annotation.TargetApi +import android.graphics.Bitmap +import android.graphics.Canvas +import android.graphics.Paint +import android.graphics.RenderEffect +import android.graphics.RenderNode +import android.os.Build +import com.facebook.react.bridge.ReadableArray +import com.facebook.react.uimanager.FilterHelper + +/** + * Helper object for applying CSS backdrop-filter effects on Android. + * + * Applies filter effects to the composited backdrop (the pixels behind a view) captured as a + * [Bitmap] snapshot. Color-matrix filters (brightness, contrast, grayscale, hue-rotate, invert, + * opacity, saturate, sepia) work on all supported API levels. Blur and drop-shadow require API 31+ + * via [RenderEffect] drawn into the hardware-accelerated canvas via [RenderNode]. + */ +@SuppressLint("UseRequiresApi") +internal object BackdropFilterHelper { + + /** + * Draws a filtered region of [source] directly onto [canvas] at the child's position. + * + * @param canvas Hardware-accelerated canvas of the parent [ReactViewGroup]. + * @param source Full-size backdrop snapshot bitmap (same dimensions as the parent view). + * @param destLeft Left coordinate of the child in parent space (canvas destination). + * @param destTop Top coordinate of the child in parent space (canvas destination). + * @param srcLeft Clamped left bound of the crop region within [source]. + * @param srcTop Clamped top bound of the crop region within [source]. + * @param srcRight Clamped right bound of the crop region within [source]. + * @param srcBottom Clamped bottom bound of the crop region within [source]. + * @param filters ReadableArray of filter descriptors as produced by processFilter.js. + */ + fun drawFilteredBackdrop( + canvas: Canvas, + source: Bitmap, + destLeft: Int, + destTop: Int, + srcLeft: Int, + srcTop: Int, + srcRight: Int, + srcBottom: Int, + filters: ReadableArray, + ) { + val cropWidth = srcRight - srcLeft + val cropHeight = srcBottom - srcTop + if (cropWidth <= 0 || cropHeight <= 0) return + + val cropped = Bitmap.createBitmap(source, srcLeft, srcTop, cropWidth, cropHeight) + try { + when { + FilterHelper.isOnlyColorMatrixFilters(filters) -> { + val paint = Paint(Paint.ANTI_ALIAS_FLAG) + paint.colorFilter = FilterHelper.parseColorMatrixFilters(filters) + canvas.drawBitmap(cropped, destLeft.toFloat(), destTop.toFloat(), paint) + } + Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { + drawWithRenderEffect(canvas, cropped, destLeft.toFloat(), destTop.toFloat(), filters) + } + else -> { + // Pre-API 31: blur and drop-shadow are not supported; draw the backdrop unfiltered so + // at least the element's transparency is composited correctly. + canvas.drawBitmap(cropped, destLeft.toFloat(), destTop.toFloat(), null) + } + } + } finally { + cropped.recycle() + } + } + + @TargetApi(Build.VERSION_CODES.S) + private fun drawWithRenderEffect( + canvas: Canvas, + source: Bitmap, + destLeft: Float, + destTop: Float, + filters: ReadableArray, + ) { + val renderEffect: RenderEffect = + FilterHelper.parseFilters(filters) + ?: run { + canvas.drawBitmap(source, destLeft, destTop, null) + return + } + + val renderNode = RenderNode("backdropFilter") + renderNode.setPosition(0, 0, source.width, source.height) + renderNode.setRenderEffect(renderEffect) + + val recordCanvas = renderNode.beginRecording() + recordCanvas.drawBitmap(source, 0f, 0f, null) + renderNode.endRecording() + + canvas.save() + canvas.translate(destLeft, destTop) + canvas.drawRenderNode(renderNode) + canvas.restore() + } +} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/NativeBackdropFilter.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/NativeBackdropFilter.kt new file mode 100644 index 000000000000..5d91c498be85 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/NativeBackdropFilter.kt @@ -0,0 +1,164 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.react.views.view + +import android.annotation.SuppressLint +import android.graphics.Canvas +import android.graphics.Color +import android.graphics.Outline +import android.graphics.RenderEffect +import android.graphics.RenderNode +import android.os.Build +import android.view.View +import com.facebook.common.logging.FLog +import com.facebook.react.R +import com.facebook.react.bridge.ReadableArray +import com.facebook.react.uimanager.FilterHelper +import java.lang.reflect.Method + +/** + * Draws `backdropFilter` with the platform backdrop API (SDK 37.2+). + * + * [RenderNode.setBackdropRenderEffect] applies a [RenderEffect] to everything already drawn behind + * the node, on the RenderThread. There is no bitmap snapshot, and the backdrop includes everything + * behind the view: content of other parents, scrolling content, ancestors. + * + * The effect lives on a separate, empty [RenderNode] clipped to the view's outline (its border + * radius). Setting it on the view itself would need `clipToOutline` on the view, which would also + * clip the view's content even with `overflow: visible`. + * + * A [ReactViewGroup] draws the node at the start of its own [View.draw] ([drawBehindSelf]), so the + * node is part of the view's display list and follows its transform, opacity and visibility, + * including native-driver animations that never re-record the parent. Other views are handled by + * their parent ([drawBehindChild]). + * + * The method is looked up by reflection because React Native compiles against SDK 37.0, which does + * not have it. Remove the reflection once compileSdk is 37.2 or later. + */ +@SuppressLint("UseRequiresApi", "NewApi") +internal object NativeBackdropFilter { + + private const val TAG = "NativeBackdropFilter" + + // Build.VERSION_CODES_FULL value of SDK 37.2 (major * 100000 + minor). + private const val SDK_37_2 = 3_700_002 + + private val setBackdropRenderEffect: Method? by + lazy(LazyThreadSafetyMode.NONE) { + if (Build.VERSION.SDK_INT < 37 || Build.VERSION.SDK_INT_FULL < SDK_37_2) { + return@lazy null + } + try { + RenderNode::class.java.getMethod("setBackdropRenderEffect", RenderEffect::class.java) + } catch (e: NoSuchMethodException) { + FLog.w(TAG, "RenderNode.setBackdropRenderEffect is missing on SDK 37.2+", e) + null + } + } + + /** Whether this device can draw backdrop filters natively. */ + val isSupported: Boolean + get() = setBackdropRenderEffect != null + + private class State(val node: RenderNode) { + var filters: ReadableArray? = null + var effect: RenderEffect? = null + } + + private val outline = Outline() + + /** + * Draws the filtered backdrop of [view] into its own [canvas], before anything of the view is + * drawn. Returns false when it could not be drawn natively. + */ + fun drawBehindSelf(canvas: Canvas, view: View, filters: ReadableArray): Boolean { + val node = prepare(canvas, view, filters) ?: return false + canvas.drawRenderNode(node) + return true + } + + /** + * Draws the filtered backdrop of [child] into its parent's [canvas], right before the child is + * drawn. Returns false when it could not be drawn natively. + */ + fun drawBehindChild(canvas: Canvas, child: View, filters: ReadableArray): Boolean { + val node = prepare(canvas, child, filters) ?: return false + node.setAlpha(child.alpha) + val saveCount = canvas.save() + canvas.translate(child.left.toFloat(), child.top.toFloat()) + if (!child.matrix.isIdentity) { + canvas.concat(child.matrix) + } + canvas.drawRenderNode(node) + canvas.restoreToCount(saveCount) + return true + } + + /** Releases the node kept for [view] once its backdrop filter is removed. */ + fun clear(view: View) { + val state = view.getTag(R.id.backdrop_filter_node) as? State ?: return + state.node.discardDisplayList() + view.setTag(R.id.backdrop_filter_node, null) + } + + private fun prepare(canvas: Canvas, view: View, filters: ReadableArray): RenderNode? { + val method = setBackdropRenderEffect ?: return null + if (!canvas.isHardwareAccelerated) return null + + val width = view.width + val height = view.height + if (width <= 0 || height <= 0) return null + + val state = + view.getTag(R.id.backdrop_filter_node) as? State + ?: State(RenderNode("backdropFilter")).also { + view.setTag(R.id.backdrop_filter_node, it) + } + + if (state.filters !== filters) { + state.filters = filters + state.effect = FilterHelper.parseFilters(filters) + try { + method.invoke(state.node, state.effect) + } catch (e: Exception) { + FLog.w(TAG, "setBackdropRenderEffect failed", e) + return null + } + } + if (state.effect == null) return null + + val node = state.node + node.setPosition(0, 0, width, height) + node.setOutline(outlineOf(view, width, height)) + node.setClipToOutline(true) + + // An empty node is not drawn; a transparent fill keeps it without adding pixels on top of the + // processed backdrop. + val recording = node.beginRecording(width, height) + recording.drawColor(Color.TRANSPARENT) + node.endRecording() + return node + } + + private fun outlineOf(view: View, width: Int, height: Int): Outline { + outline.setEmpty() + // A view sets its background's bounds while drawing the background, which happens after this + // node is drawn. Without bounds the background's rounded outline is empty and clips everything. + view.background?.let { background -> + val bounds = background.bounds + if (bounds.width() != width || bounds.height() != height) { + background.setBounds(0, 0, width, height) + } + } + view.outlineProvider?.getOutline(view, outline) + if (outline.isEmpty) { + outline.setRect(0, 0, width, height) + } + return outline + } +} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt index 9f78deac9ce1..1599f1f5ce92 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt @@ -13,8 +13,10 @@ import android.annotation.SuppressLint import android.annotation.TargetApi import android.content.Context import android.content.res.Configuration +import android.graphics.Bitmap import android.graphics.BlendMode import android.graphics.Canvas +import android.graphics.Color import android.graphics.Matrix import android.graphics.Paint import android.graphics.Rect @@ -31,6 +33,7 @@ import com.facebook.react.R import com.facebook.react.bridge.ReactNoCrashSoftException import com.facebook.react.bridge.ReactSoftExceptionLogger import com.facebook.react.bridge.ReactSoftExceptionLogger.logSoftException +import com.facebook.react.bridge.ReadableArray import com.facebook.react.bridge.ReadableMap import com.facebook.react.bridge.UiThreadUtil.assertOnUiThread import com.facebook.react.bridge.UiThreadUtil.runOnUiThread @@ -756,6 +759,9 @@ public open class ReactViewGroup public constructor(context: Context?) : override fun onDetachedFromWindow() { sendPendingAccessibilityHoverExit() super.onDetachedFromWindow() + backdropBitmap?.recycle() + backdropBitmap = null + backdropCanvas = null } override fun onConfigurationChanged(newConfig: Configuration) { @@ -1050,6 +1056,14 @@ public open class ReactViewGroup public constructor(context: Context?) : } override fun draw(canvas: Canvas) { + // Drawn before an isolated layer is opened: inside the layer there is no backdrop to filter. + val backdropFilter = getTag(R.id.backdrop_filter) as? ReadableArray + if (backdropFilter != null) { + NativeBackdropFilter.drawBehindSelf(canvas, this, backdropFilter) + } else if (getTag(R.id.backdrop_filter_node) != null) { + NativeBackdropFilter.clear(this) + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && needsIsolatedLayer(this)) { // Check if the view is a stacking context and has children, if it does, do the rendering // offscreen and then composite back. This follows the idea of group isolation on blending @@ -1070,11 +1084,38 @@ public open class ReactViewGroup public constructor(context: Context?) : } } + // Snapshot of the parent's composited content (background + previous siblings) used to apply + // backdrop-filter effects on children that request them. + private var backdropBitmap: Bitmap? = null + private var backdropCanvas: Canvas? = null + private var hasBackdropFilterChild = false + override fun dispatchDraw(canvas: Canvas) { if (_overflow != Overflow.VISIBLE || getTag(R.id.filter) != null) { clipToPaddingBox(this, canvas) } + + hasBackdropFilterChild = + (0 until childCount).any { getChildAt(it).getTag(R.id.backdrop_filter) != null } + + if (hasBackdropFilterChild && width > 0 && height > 0 && !NativeBackdropFilter.isSupported) { + val bmp = + backdropBitmap?.takeIf { it.width == width && it.height == height } + ?: Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888).also { + backdropBitmap?.recycle() + backdropBitmap = it + } + bmp.eraseColor(Color.WHITE) + val snapCanvas = Canvas(bmp) + backdropCanvas = snapCanvas + background?.draw(snapCanvas) + } + super.dispatchDraw(canvas) + + if (hasBackdropFilterChild) { + backdropCanvas = null + } } override fun drawChild(canvas: Canvas, child: View, drawingTime: Long): Boolean { @@ -1084,6 +1125,46 @@ public open class ReactViewGroup public constructor(context: Context?) : enableZ(canvas, true) } + val backdropFilter: ReadableArray? = + if (hasBackdropFilterChild) child.getTag(R.id.backdrop_filter) as? ReadableArray else null + // On SDK 37.2+ the backdrop is drawn natively: a ReactViewGroup draws its own (see [draw]), + // any other view is drawn here. Below that, the snapshot taken in [dispatchDraw] is filtered. + val drawnNatively = + backdropFilter != null && + NativeBackdropFilter.isSupported && + (child is ReactViewGroup || + (child.visibility == VISIBLE && + NativeBackdropFilter.drawBehindChild(canvas, child, backdropFilter))) + if ( + backdropFilter == null && + child !is ReactViewGroup && + child.getTag(R.id.backdrop_filter_node) != null + ) { + NativeBackdropFilter.clear(child) + } + val snapBitmap = backdropBitmap + if (backdropFilter != null && !drawnNatively && snapBitmap != null) { + val childLeft = child.left + val childTop = child.top + val srcLeft = childLeft.coerceAtLeast(0).coerceAtMost(snapBitmap.width) + val srcTop = childTop.coerceAtLeast(0).coerceAtMost(snapBitmap.height) + val srcRight = child.right.coerceAtLeast(0).coerceAtMost(snapBitmap.width) + val srcBottom = child.bottom.coerceAtLeast(0).coerceAtMost(snapBitmap.height) + if (srcRight > srcLeft && srcBottom > srcTop) { + BackdropFilterHelper.drawFilteredBackdrop( + canvas, + snapBitmap, + childLeft, + childTop, + srcLeft, + srcTop, + srcRight, + srcBottom, + backdropFilter, + ) + } + } + var mixBlendMode: BlendMode? = null if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { mixBlendMode = child.getTag(R.id.mix_blend_mode) as? BlendMode @@ -1107,6 +1188,12 @@ public open class ReactViewGroup public constructor(context: Context?) : canvas.restore() } + // Update snapshot so subsequent backdrop-filter siblings see this child's pixels. + val snapCanvas = backdropCanvas + if (hasBackdropFilterChild && snapCanvas != null && backdropFilter == null) { + super.drawChild(snapCanvas, child, drawingTime) + } + if (drawWithZ) { enableZ(canvas, false) } diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/ids.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/ids.xml index f03f85cdc201..93a98d6d6804 100644 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/ids.xml +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/ids.xml @@ -80,6 +80,12 @@ + + + + + + diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp index 98332197d3fb..65948b2060eb 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp @@ -209,6 +209,12 @@ BaseViewProps::BaseViewProps( {})), filter( convertRawProp(context, rawProps, "filter", sourceProps.filter, {})), + backdropFilter(convertRawProp( + context, + rawProps, + "backdropFilter", + sourceProps.backdropFilter, + {})), backgroundImage(convertRawProp( context, rawProps, @@ -396,6 +402,7 @@ void BaseViewProps::setProp( RAW_SET_PROP_SWITCH_CASE_BASIC(outlineStyle); RAW_SET_PROP_SWITCH_CASE_BASIC(outlineWidth); RAW_SET_PROP_SWITCH_CASE_BASIC(filter); + RAW_SET_PROP_SWITCH_CASE_BASIC(backdropFilter); RAW_SET_PROP_SWITCH_CASE_BASIC(boxShadow); RAW_SET_PROP_SWITCH_CASE_BASIC(mixBlendMode); // events field diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.h b/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.h index b72c5f944f63..fbde3d8d2524 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.h @@ -74,6 +74,9 @@ class BaseViewProps : public YogaStylableProps, public AccessibilityProps { // Filter std::vector filter{}; + // Backdrop Filter + std::vector backdropFilter{}; + // Background Image std::vector backgroundImage{}; diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp index 5dca96365803..fe016b243f8b 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp @@ -62,6 +62,7 @@ void ViewShadowNode::initialize() noexcept { viewProps.importantForAccessibility != ImportantForAccessibility::Auto || viewProps.removeClippedSubviews || viewProps.cursor != Cursor::Auto || viewProps.onSafeAreaInsetsChange || !viewProps.filter.empty() || + !viewProps.backdropFilter.empty() || viewProps.mixBlendMode != BlendMode::Normal || viewProps.isolation == Isolation::Isolate || HostPlatformViewTraitsInitializer::formsStackingContext(viewProps) ||