Reverts "[Impeller] use DeviceLocal textures for gifs on non-iOS devices. (#164573)" (#164600)

<!-- start_original_pr_link -->
Reverts: flutter/flutter#164573
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: jonahwilliams
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: le crash
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: jonahwilliams
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {matanlurey}
<!-- end_reviewers -->

<!-- start_revert_body -->
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.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
This commit is contained in:
auto-submit[bot]
2025-03-05 05:45:26 +00:00
committed by GitHub
parent ccf99229c7
commit ca9d3b018a
2 changed files with 0 additions and 15 deletions

View File

@@ -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;

View File

@@ -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);
}