Flutter iOS Embedder
ios_context.mm
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
6 
7 #include <memory>
8 
9 #include "flutter/fml/logging.h"
10 #import "flutter/shell/platform/darwin/common/InternalFlutterSwiftCommon/InternalFlutterSwiftCommon.h"
12 
14 
15 namespace flutter {
16 
17 IOSContext::IOSContext() = default;
18 
19 IOSContext::~IOSContext() = default;
20 
21 std::unique_ptr<IOSContext> IOSContext::Create(
22  const std::shared_ptr<const fml::SyncSwitch>& is_gpu_disabled_sync_switch,
23  const Settings& settings) {
24  return std::make_unique<IOSContextMetalImpeller>(settings, is_gpu_disabled_sync_switch);
25 }
26 
27 std::shared_ptr<impeller::Context> IOSContext::GetImpellerContext() const {
28  return nullptr;
29 }
30 
31 std::shared_ptr<impeller::AiksContext> IOSContext::GetAiksContext() const {
32  return nullptr;
33 }
34 
35 } // namespace flutter
virtual std::shared_ptr< impeller::Context > GetImpellerContext() const
Definition: ios_context.mm:27
virtual ~IOSContext()
Collects the context object. This must happen on the thread on which this object was created.
virtual std::shared_ptr< impeller::AiksContext > GetAiksContext() const
Definition: ios_context.mm:31
static std::unique_ptr< IOSContext > Create(const std::shared_ptr< const fml::SyncSwitch > &is_gpu_disabled_sync_switch, const Settings &settings)
Create an iOS context object capable of creating the on-screen and off-screen GPU context for use by ...
Definition: ios_context.mm:21