Skip to content

Commit

Permalink
Migrate a few "leaf import" MRC iOS files to ARC
Browse files Browse the repository at this point in the history
  • Loading branch information
jmagman committed Apr 8, 2024
1 parent 932c550 commit 12437e1
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 14 deletions.
33 changes: 19 additions & 14 deletions shell/platform/darwin/ios/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,31 @@ source_set("flutter_framework_source_arc") {
"framework/Source/FlutterTextInputDelegate.h",
"framework/Source/FlutterTextInputPlugin.h",
"framework/Source/FlutterTextInputPlugin.mm",
"framework/Source/connection_collection.h",
"framework/Source/connection_collection.mm",
"framework/Source/platform_message_response_darwin.h",
"framework/Source/platform_message_response_darwin.mm",
"framework/Source/profiler_metrics_ios.h",
"framework/Source/profiler_metrics_ios.mm",
"ios_context.h",
"ios_context.mm",
"ios_context_software.h",
"ios_context_software.mm",
"rendering_api_selection.h",
"rendering_api_selection.mm",
]

frameworks = [
"UIKit.framework",
"IOSurface.framework",
]

deps += [
"//flutter/common/graphics",
"//flutter/lib/ui",
"//flutter/shell/platform/darwin/common",
"//flutter/shell/profiling:profiling",
]
}

source_set("flutter_framework_source") {
Expand Down Expand Up @@ -137,22 +156,12 @@ source_set("flutter_framework_source") {
"framework/Source/accessibility_bridge.mm",
"framework/Source/accessibility_text_entry.h",
"framework/Source/accessibility_text_entry.mm",
"framework/Source/connection_collection.h",
"framework/Source/connection_collection.mm",
"framework/Source/platform_message_response_darwin.h",
"framework/Source/platform_message_response_darwin.mm",
"framework/Source/profiler_metrics_ios.h",
"framework/Source/profiler_metrics_ios.mm",
"framework/Source/vsync_waiter_ios.h",
"framework/Source/vsync_waiter_ios.mm",
"ios_context.h",
"ios_context.mm",
"ios_context_metal_impeller.h",
"ios_context_metal_impeller.mm",
"ios_context_metal_skia.h",
"ios_context_metal_skia.mm",
"ios_context_software.h",
"ios_context_software.mm",
"ios_external_texture_metal.h",
"ios_external_texture_metal.mm",
"ios_external_view_embedder.h",
Expand All @@ -169,8 +178,6 @@ source_set("flutter_framework_source") {
"platform_message_handler_ios.mm",
"platform_view_ios.h",
"platform_view_ios.mm",
"rendering_api_selection.h",
"rendering_api_selection.mm",
]

sources += _flutter_framework_headers
Expand All @@ -183,10 +190,8 @@ source_set("flutter_framework_source") {
deps += [
":ios_gpu_configuration",
"//flutter/common",
"//flutter/common/graphics",
"//flutter/flow",
"//flutter/fml",
"//flutter/lib/ui",
"//flutter/runtime",
"//flutter/runtime:libdart",
"//flutter/shell/common",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

#import "flutter/shell/platform/darwin/ios/framework/Source/connection_collection.h"

#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"

FLUTTER_ASSERT_ARC

namespace flutter {
ConnectionCollection::Connection ConnectionCollection::AquireConnection(const std::string& name) {
Connection nextConnection = ++counter_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

#import "flutter/shell/platform/darwin/ios/framework/Source/platform_message_response_darwin.h"

#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"

FLUTTER_ASSERT_ARC

namespace flutter {

PlatformMessageResponseDarwin::PlatformMessageResponseDarwin(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@

#import <Foundation/Foundation.h>

#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"
#import "flutter/shell/platform/darwin/ios/framework/Source/IOKit.h"

FLUTTER_ASSERT_ARC

namespace {

// RAII holder for `thread_array_t` this is so any early returns in
Expand Down
2 changes: 2 additions & 0 deletions shell/platform/darwin/ios/ios_context.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "flutter/shell/platform/darwin/ios/ios_context_metal_skia.h"
#include "flutter/shell/platform/darwin/ios/ios_context_software.h"

FLUTTER_ASSERT_ARC

namespace flutter {

IOSContext::IOSContext(MsaaSampleCount msaa_samples) : msaa_samples_(msaa_samples) {}
Expand Down
2 changes: 2 additions & 0 deletions shell/platform/darwin/ios/ios_context_software.mm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#import "flutter/shell/platform/darwin/ios/ios_context_software.h"
#include "ios_context.h"

FLUTTER_ASSERT_ARC

namespace flutter {

IOSContextSoftware::IOSContextSoftware() : IOSContext(MsaaSampleCount::kNone) {}
Expand Down
3 changes: 3 additions & 0 deletions shell/platform/darwin/ios/rendering_api_selection.mm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@

#include "flutter/fml/logging.h"

#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"
#include "flutter/shell/platform/darwin/ios/framework/Source/FlutterMetalLayer.h"

FLUTTER_ASSERT_ARC

namespace flutter {

bool ShouldUseMetalRenderer() {
Expand Down

0 comments on commit 12437e1

Please sign in to comment.