mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This patch applies the following changes: * Rename a stray .cc file to .mm (connection_collection.cc). * Migrate Objective-C #includes to #import as per the style guide. * #include/#import order updated to reflect the style guide order: associated header, system/standard library headers, library headers, platform-specific includes. * Include cstring where we're using strlen. * Add a missing copyright header in SemanticsObjectTest.mm. Bugs: https://github.com/flutter/flutter/issues/60025
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#import "flutter/shell/platform/darwin/ios/ios_context.h"
|
|
|
|
#include "flutter/fml/logging.h"
|
|
#import "flutter/shell/platform/darwin/ios/ios_context_gl.h"
|
|
#import "flutter/shell/platform/darwin/ios/ios_context_software.h"
|
|
|
|
#if FLUTTER_SHELL_ENABLE_METAL
|
|
#import "flutter/shell/platform/darwin/ios/ios_context_metal.h"
|
|
#endif // FLUTTER_SHELL_ENABLE_METAL
|
|
|
|
namespace flutter {
|
|
|
|
IOSContext::IOSContext() = default;
|
|
|
|
IOSContext::~IOSContext() = default;
|
|
|
|
std::unique_ptr<IOSContext> IOSContext::Create(IOSRenderingAPI rendering_api) {
|
|
switch (rendering_api) {
|
|
case IOSRenderingAPI::kOpenGLES:
|
|
return std::make_unique<IOSContextGL>();
|
|
case IOSRenderingAPI::kSoftware:
|
|
return std::make_unique<IOSContextSoftware>();
|
|
#if FLUTTER_SHELL_ENABLE_METAL
|
|
case IOSRenderingAPI::kMetal:
|
|
return std::make_unique<IOSContextMetal>();
|
|
#endif // FLUTTER_SHELL_ENABLE_METAL
|
|
default:
|
|
break;
|
|
}
|
|
FML_CHECK(false);
|
|
return nullptr;
|
|
}
|
|
|
|
} // namespace flutter
|