From ca9d3b018a6490b810867d6da343960f6224a5e1 Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" <98614782+auto-submit[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 05:45:26 +0000 Subject: [PATCH] Reverts "[Impeller] use DeviceLocal textures for gifs on non-iOS devices. (#164573)" (#164600) Reverts: flutter/flutter#164573 Initiated by: jonahwilliams Reason for reverting: le crash Original PR Author: jonahwilliams Reviewed By: {matanlurey} This change reverts the following previous change: Part of https://github.com/flutter/flutter/issues/136365, https://github.com/flutter/flutter/issues/134399 We only use DeviceLocal on iOS to work around background requirements. On other platforms there is no need for this. Co-authored-by: auto-submit[bot] --- .../flutter/lib/ui/painting/image_decoder_impeller.cc | 4 ---- .../lib/ui/painting/image_decoder_unittests.cc | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/engine/src/flutter/lib/ui/painting/image_decoder_impeller.cc b/engine/src/flutter/lib/ui/painting/image_decoder_impeller.cc index 5b5a2b09ed..e72d63bc7a 100644 --- a/engine/src/flutter/lib/ui/painting/image_decoder_impeller.cc +++ b/engine/src/flutter/lib/ui/painting/image_decoder_impeller.cc @@ -466,11 +466,7 @@ ImageDecoderImpeller::UploadTextureToStorage( } impeller::TextureDescriptor texture_descriptor; -#ifdef FML_OS_IOS texture_descriptor.storage_mode = impeller::StorageMode::kHostVisible; -#else - texture_descriptor.storage_mode = impeller::StorageMode::kDevicePrivate; -#endif // FML_OS_IOS texture_descriptor.format = pixel_format.value(); texture_descriptor.size = {image_info.width(), image_info.height()}; texture_descriptor.mip_count = 1; diff --git a/engine/src/flutter/lib/ui/painting/image_decoder_unittests.cc b/engine/src/flutter/lib/ui/painting/image_decoder_unittests.cc index 2c5b6bbb5b..968c09d344 100644 --- a/engine/src/flutter/lib/ui/painting/image_decoder_unittests.cc +++ b/engine/src/flutter/lib/ui/painting/image_decoder_unittests.cc @@ -24,7 +24,6 @@ #include "flutter/testing/test_gl_surface.h" #include "flutter/testing/testing.h" #include "fml/logging.h" -#include "impeller/core/formats.h" #include "impeller/core/runtime_types.h" #include "impeller/renderer/command_queue.h" #include "third_party/skia/include/codec/SkCodecAnimation.h" @@ -387,16 +386,6 @@ TEST_F(ImageDecoderFixtureTest, ImpellerUploadToSharedNoGpu) { ASSERT_EQ(result.second, ""); EXPECT_EQ(no_gpu_access_context->DidDisposeResources(), true); -#if FML_OS_IOS - EXPECT_EQ( - result.first->impeller_texture()->GetTextureDescriptor().storage_mode, - impeller::StorageMode::kHostVisible); -#else - EXPECT_EQ( - result.first->impeller_texture()->GetTextureDescriptor().storage_mode, - impeller::StorageMode::kDevicePrivate); -#endif // FML_OS_IOS - no_gpu_access_context->FlushTasks(/*fail=*/true); }