Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit cef18e6

Browse files
committed
context
1 parent dc9e4fe commit cef18e6

File tree

5 files changed

+21
-14
lines changed

5 files changed

+21
-14
lines changed

shell/platform/darwin/ios/BUILD.gn

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,14 @@ source_set("flutter_framework_source_arc") {
7474
"framework/Source/profiler_metrics_ios.mm",
7575
"ios_context.h",
7676
"ios_context.mm",
77+
"ios_context_metal_impeller.h",
78+
"ios_context_metal_impeller.mm",
79+
"ios_context_metal_skia.h",
80+
"ios_context_metal_skia.mm",
7781
"ios_context_software.h",
7882
"ios_context_software.mm",
83+
"ios_external_texture_metal.h",
84+
"ios_external_texture_metal.mm",
7985
"rendering_api_selection.h",
8086
"rendering_api_selection.mm",
8187
]
@@ -86,9 +92,11 @@ source_set("flutter_framework_source_arc") {
8692
]
8793

8894
deps += [
95+
":ios_gpu_configuration",
8996
"//flutter/common/graphics",
9097
"//flutter/lib/ui",
9198
"//flutter/shell/platform/darwin/common",
99+
"//flutter/shell/platform/darwin/graphics",
92100
"//flutter/shell/profiling:profiling",
93101
]
94102
}
@@ -158,12 +166,6 @@ source_set("flutter_framework_source") {
158166
"framework/Source/accessibility_text_entry.mm",
159167
"framework/Source/vsync_waiter_ios.h",
160168
"framework/Source/vsync_waiter_ios.mm",
161-
"ios_context_metal_impeller.h",
162-
"ios_context_metal_impeller.mm",
163-
"ios_context_metal_skia.h",
164-
"ios_context_metal_skia.mm",
165-
"ios_external_texture_metal.h",
166-
"ios_external_texture_metal.mm",
167169
"ios_external_view_embedder.h",
168170
"ios_external_view_embedder.mm",
169171
"ios_surface.h",
@@ -198,7 +200,6 @@ source_set("flutter_framework_source") {
198200
"//flutter/shell/platform/common:common_cpp_input",
199201
"//flutter/shell/platform/darwin/common",
200202
"//flutter/shell/platform/darwin/common:framework_common",
201-
"//flutter/shell/platform/darwin/graphics",
202203
"//flutter/shell/platform/embedder:embedder_as_internal_library",
203204
"//flutter/shell/profiling:profiling",
204205
"//flutter/skia",

shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
#import <UIKit/UIKit.h>
5+
#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.h"
66

77
#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"
8-
#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.h"
8+
9+
#import <UIKit/UIKit.h>
910

1011
FLUTTER_ASSERT_ARC
1112

shell/platform/darwin/ios/ios_context_metal_impeller.mm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include "flutter/impeller/entity/mtl/entity_shaders.h"
77
#import "flutter/shell/platform/darwin/ios/ios_external_texture_metal.h"
88

9+
FLUTTER_ASSERT_ARC
10+
911
namespace flutter {
1012

1113
IOSContextMetalImpeller::IOSContextMetalImpeller(
@@ -54,9 +56,9 @@
5456
int64_t texture_id,
5557
fml::scoped_nsobject<NSObject<FlutterTexture>> texture) {
5658
return std::make_unique<IOSExternalTextureMetal>(
57-
fml::scoped_nsobject<FlutterDarwinExternalTextureMetal>{
58-
[[darwin_context_metal_impeller_ createExternalTextureWithIdentifier:texture_id
59-
texture:texture] retain]});
59+
fml::scoped_nsobject<FlutterDarwinExternalTextureMetal>{[darwin_context_metal_impeller_
60+
createExternalTextureWithIdentifier:texture_id
61+
texture:texture]});
6062
}
6163

6264
} // namespace flutter

shell/platform/darwin/ios/ios_context_metal_skia.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#import "flutter/shell/platform/darwin/ios/ios_external_texture_metal.h"
1111
#include "third_party/skia/include/gpu/GrContextOptions.h"
1212

13+
FLUTTER_ASSERT_ARC
14+
1315
namespace flutter {
1416

1517
IOSContextMetalSkia::IOSContextMetalSkia(MsaaSampleCount msaa_samples) : IOSContext(msaa_samples) {
@@ -52,8 +54,7 @@
5254
fml::scoped_nsobject<NSObject<FlutterTexture>> texture) {
5355
return std::make_unique<IOSExternalTextureMetal>(
5456
fml::scoped_nsobject<FlutterDarwinExternalTextureMetal>{
55-
[[darwin_context_metal_ createExternalTextureWithIdentifier:texture_id
56-
texture:texture] retain]});
57+
[darwin_context_metal_ createExternalTextureWithIdentifier:texture_id texture:texture]});
5758
}
5859

5960
} // namespace flutter

shell/platform/darwin/ios/ios_external_texture_metal.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#import "flutter/shell/platform/darwin/ios/ios_external_texture_metal.h"
66
#include "flow/layers/layer.h"
77

8+
FLUTTER_ASSERT_ARC
9+
810
namespace flutter {
911

1012
IOSExternalTextureMetal::IOSExternalTextureMetal(

0 commit comments

Comments
 (0)