From 156b05274e90568a6beeda3dbe9feeb5f556f240 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 16 Aug 2023 16:09:08 -0700 Subject: [PATCH] Revert "Conditionally enable HardwareBuffer backed platform views (#44744)" (flutter/engine#44785) This reverts commit 4620733d5c4b100fae10861eaae6d6e97003c282. The https://github.com/flutter/flutter/tree/master/dev/integration_tests/abstract_method_smoke_test test was not rendering the platform view with that change. --- .../io/flutter/plugin/platform/PlatformViewsController.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index 0df81363ca..f9500cdf00 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -968,12 +968,11 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega private static PlatformViewRenderTarget makePlatformViewRenderTarget( TextureRegistry textureRegistry) { - if (Build.VERSION.SDK_INT >= 29) { - // Prefer ImageReader-based backend on versions >= 29. + // TODO(johnmccutchan): Enable ImageReaderPlatformViewRenderTarget for public use. + if (false) { final TextureRegistry.ImageTextureEntry textureEntry = textureRegistry.createImageTexture(); return new ImageReaderPlatformViewRenderTarget(textureEntry); } - // Fallback to SurfaceTexture support on old phones. final TextureRegistry.SurfaceTextureEntry textureEntry = textureRegistry.createSurfaceTexture(); return new SurfaceTexturePlatformViewRenderTarget(textureEntry); }