From e7d3223c619df00e2e851b83f97bcd3aba55f515 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 1 May 2025 20:12:07 -0700 Subject: [PATCH] macOS: Delete unused FlutterRenderBackingStore (#168159) All usages of this code were removed in ed9d9bf372ba9ebd97446fb8a8f8b03f0f42986a during the great macOS renderer refactor of 2022. ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --- .../ci/licenses_golden/licenses_flutter | 4 --- .../shell/platform/darwin/macos/BUILD.gn | 2 -- .../framework/Source/FlutterBackingStore.h | 29 ------------------- .../framework/Source/FlutterBackingStore.mm | 17 ----------- 4 files changed, 52 deletions(-) delete mode 100644 engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.h delete mode 100644 engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.mm diff --git a/engine/src/flutter/ci/licenses_golden/licenses_flutter b/engine/src/flutter/ci/licenses_golden/licenses_flutter index dc0be46ac9c..311ee726265 100644 --- a/engine/src/flutter/ci/licenses_golden/licenses_flutter +++ b/engine/src/flutter/ci/licenses_golden/licenses_flutter @@ -52907,8 +52907,6 @@ ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterApp ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterAppLifecycleDelegate.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterAppLifecycleDelegateTest.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterAppLifecycleDelegate_Internal.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponder.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponder.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponderTest.mm + ../../../flutter/LICENSE @@ -55920,8 +55918,6 @@ FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterAppDe FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterAppLifecycleDelegate.mm FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterAppLifecycleDelegateTest.mm FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterAppLifecycleDelegate_Internal.h -FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.h -FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.mm FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponder.h FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponder.mm FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponderTest.mm diff --git a/engine/src/flutter/shell/platform/darwin/macos/BUILD.gn b/engine/src/flutter/shell/platform/darwin/macos/BUILD.gn index b0a9f869c71..3722db1d62f 100644 --- a/engine/src/flutter/shell/platform/darwin/macos/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/macos/BUILD.gn @@ -60,8 +60,6 @@ source_set("flutter_framework_source") { "framework/Source/AccessibilityBridgeMac.mm", "framework/Source/FlutterAppDelegate.mm", "framework/Source/FlutterAppLifecycleDelegate.mm", - "framework/Source/FlutterBackingStore.h", - "framework/Source/FlutterBackingStore.mm", "framework/Source/FlutterChannelKeyResponder.h", "framework/Source/FlutterChannelKeyResponder.mm", "framework/Source/FlutterCompositor.h", diff --git a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.h b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.h deleted file mode 100644 index 80f8bfe1c75..00000000000 --- a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.h +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERBACKINGSTORE_H_ -#define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERBACKINGSTORE_H_ - -#import -#import - -/** - * Interface for backing store handles. Typically contain references to the buffers that - * are handed by the `FlutterView` to the `FlutterRenderer`. - */ -@interface FlutterRenderBackingStore : NSObject - -/** - * MTLTexture referenced by this backing store instance. - */ -@property(nonnull, nonatomic, readonly) id texture; - -/** - * Initializes a backing store with the specified MTLTexture. - */ -- (nonnull instancetype)initWithTexture:(nonnull id)texture; - -@end - -#endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERBACKINGSTORE_H_ diff --git a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.mm b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.mm deleted file mode 100644 index 61404932c9c..00000000000 --- a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.mm +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterBackingStore.h" - -@implementation FlutterRenderBackingStore - -- (instancetype)initWithTexture:(id)texture { - self = [super init]; - if (self) { - _texture = texture; - } - return self; -} - -@end