[macOS] Cleanup unnecessary references to Metal (flutter/engine#37733)
Removes a few unncessary references to Metal in the macOS embedder. Now that Metal is the only supported rendering implementation for the macOS embedder, specifying a class as a Metal variant is redundant. Issue: https://github.com/flutter/flutter/issues/108304 Issue: https://github.com/flutter/flutter/issues/114445
This commit is contained in:
@@ -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];
|
||||
@@ -57,7 +57,7 @@ id<FlutterViewProvider> MockViewProvider() {
|
||||
})
|
||||
.andReturn(backingStoreMock);
|
||||
|
||||
return [[FlutterViewMockProviderMetal alloc] initWithDefaultView:viewMock];
|
||||
return [[FlutterViewMockProvider alloc] initWithDefaultView:viewMock];
|
||||
}
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -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];
|
||||
@@ -32,7 +32,7 @@ namespace flutter::testing {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user