This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree 3 files changed +6
-5
lines changed
shell/platform/darwin/macos/framework/Source 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 67
67
* Must be called on raster thread. This will schedule a commit on platform
68
68
* thread and block raster thread until the commit is done.
69
69
* `notify` block will be invoked on platform thread and can be used to perform
70
- * additional work after commit is done , such as mutating platform views.
71
- * It is guaranteed be called in same CATransaction.
70
+ * additional work, such as mutating platform views. It is guaranteed be called in
71
+ * same CATransaction.
72
72
*/
73
73
- (void )present : (nonnull NSArray <FlutterSurfacePresentInfo*>*)surfaces
74
74
notify : (nullable dispatch_block_t )notify ;
Original file line number Diff line number Diff line change @@ -26,10 +26,11 @@ - (instancetype)init {
26
26
return self;
27
27
}
28
28
29
- - (nullable FlutterSurface*)getSurfaceForSize : (CGSize )size {
29
+ - (nullable FlutterSurface*)removeSurfaceForSize : (CGSize )size {
30
30
@synchronized (self) {
31
31
for (FlutterSurface* surface in _surfaces) {
32
32
if (CGSizeEqualToSize (surface.size , size)) {
33
+ // By default ARC doesn't retain enumartion iteration variables.
33
34
FlutterSurface* res = surface;
34
35
[_surfaces removeObject: surface];
35
36
return res;
@@ -138,7 +139,7 @@ - (FlutterSurface*)lookupSurface:(nonnull const FlutterMetalTexture*)texture {
138
139
}
139
140
140
141
- (FlutterSurface*)backBufferForSize : (CGSize )size {
141
- FlutterSurface* res = [_backBufferCache getSurfaceForSize : size];
142
+ FlutterSurface* res = [_backBufferCache removeSurfaceForSize : size];
142
143
if (res == nil ) {
143
144
res = [[FlutterSurface alloc ] initWithSize: size device: _device];
144
145
}
Original file line number Diff line number Diff line change 14
14
/* *
15
15
* Removes surface with given size from cache (if available) and returns it.
16
16
*/
17
- - (nullable FlutterSurface*)getSurfaceForSize : (CGSize )size ;
17
+ - (nullable FlutterSurface*)removeSurfaceForSize : (CGSize )size ;
18
18
19
19
/* *
20
20
* Removes all cached surface replacing them with new ones.
You can’t perform that action at this time.
0 commit comments