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

[macOS] Cleanup unnecessary references to Metal #37733

Merged
merged 1 commit into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewProvider.h"
#import "flutter/testing/testing.h"

@interface FlutterViewMockProviderMetal : NSObject <FlutterViewProvider> {
@interface FlutterViewMockProvider : NSObject <FlutterViewProvider> {
FlutterView* _defaultView;
}
/**
* Create a FlutterViewMockProviderMetal with the provided view as the default view.
* Create a FlutterViewMockProvider with the provided view as the default view.
*/
- (nonnull instancetype)initWithDefaultView:(nonnull FlutterView*)view;
@end

@implementation FlutterViewMockProviderMetal
@implementation FlutterViewMockProvider

- (nonnull instancetype)initWithDefaultView:(nonnull FlutterView*)view {
self = [super init];
Expand Down Expand Up @@ -58,7 +58,7 @@ - (nullable FlutterView*)getView:(uint64_t)viewId {
})
.andReturn(backingStoreMock);

return [[FlutterViewMockProviderMetal alloc] initWithDefaultView:viewMock];
return [[FlutterViewMockProvider alloc] initWithDefaultView:viewMock];
}
} // namespace

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
#include "flutter/testing/testing.h"
#include "gtest/gtest.h"

@interface TestMetalView : NSView
@interface TestView : NSView

- (nonnull instancetype)init;

@end

@implementation TestMetalView
@implementation TestView

- (instancetype)init {
self = [super initWithFrame:NSZeroRect];
Expand All @@ -32,7 +32,7 @@ - (instancetype)init {
static FlutterSurfaceManager* CreateSurfaceManager() {
id<MTLDevice> device = MTLCreateSystemDefaultDevice();
id<MTLCommandQueue> commandQueue = [device newCommandQueue];
TestMetalView* metalView = [[TestMetalView alloc] init];
TestView* metalView = [[TestView alloc] init];
CALayer* layer = reinterpret_cast<CALayer*>(metalView.layer);
return [[FlutterSurfaceManager alloc] initWithDevice:device
commandQueue:commandQueue
Expand Down