From 6f20d973b32cbeb73f5edbd821fad60c1ce1e1b9 Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Mon, 18 Sep 2023 10:22:04 -0700 Subject: [PATCH] Disable HardwareBuffer backed Platform Views temporarily Necessary to unblock the GPay release --- .../io/flutter/plugin/platform/PlatformViewsController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index b783128900e2c..b5559a3a9e23a 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -147,6 +147,8 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega // Whether software rendering is used. private boolean usesSoftwareRendering = false; + private static boolean enableHardwareBufferRenderingTarget = false; + private final PlatformViewsChannel.PlatformViewsHandler channelHandler = new PlatformViewsChannel.PlatformViewsHandler() { @@ -968,7 +970,7 @@ private void unlockInputConnection(@NonNull VirtualDisplayController controller) private static PlatformViewRenderTarget makePlatformViewRenderTarget( TextureRegistry textureRegistry) { - if (Build.VERSION.SDK_INT >= 29) { + if (enableHardwareBufferRenderingTarget && Build.VERSION.SDK_INT >= 29) { final TextureRegistry.ImageTextureEntry textureEntry = textureRegistry.createImageTexture(); return new ImageReaderPlatformViewRenderTarget(textureEntry); }