Flutter iOS Embedder
ios_context_software.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 #include "ios_context.h"
7 
8 namespace flutter {
9 
10 IOSContextSoftware::IOSContextSoftware() : IOSContext(MsaaSampleCount::kNone) {}
11 
12 // |IOSContext|
14 
15 // |IOSContext|
17  return nullptr;
18 }
19 
20 // |IOSContext|
21 sk_sp<GrDirectContext> IOSContextSoftware::GetMainContext() const {
22  return nullptr;
23 }
24 
25 // |IOSContext|
26 std::unique_ptr<GLContextResult> IOSContextSoftware::MakeCurrent() {
27  // This only makes sense for context that need to be bound to a specific thread.
28  return std::make_unique<GLContextDefaultResult>(false);
29 }
30 
31 // |IOSContext|
33  int64_t texture_id,
34  fml::scoped_nsobject<NSObject<FlutterTexture>> texture) {
35  // Don't use FML for logging as it will contain engine specific details. This is a user facing
36  // message.
37  NSLog(@"Flutter: Attempted to composite external texture sources using the software backend. "
38  @"This backend is only used on simulators. This feature is only available on actual "
39  @"devices where OpenGL or Metal is used for rendering.");
40 
41  // Not supported in this backend.
42  return nullptr;
43 }
44 
45 } // namespace flutter
flutter::IOSContextSoftware::IOSContextSoftware
IOSContextSoftware()
Definition: ios_context_software.mm:10
flutter::IOSContextSoftware::MakeCurrent
std::unique_ptr< GLContextResult > MakeCurrent() override
When using client rendering APIs whose contexts need to be bound to a specific thread,...
Definition: ios_context_software.mm:26
flutter::IOSContextSoftware::CreateResourceContext
sk_sp< GrDirectContext > CreateResourceContext() override
Create a resource context for use on the IO task runner. This resource context is used by Skia to upl...
Definition: ios_context_software.mm:16
flutter::IOSContext
Manages the lifetime of the on-screen and off-screen rendering contexts on iOS. On-screen contexts ar...
Definition: ios_context.h:40
flutter::IOSContextSoftware::~IOSContextSoftware
~IOSContextSoftware()
flutter
Definition: accessibility_bridge.h:28
ios_context_software.h
flutter::IOSContextSoftware::CreateExternalTexture
std::unique_ptr< Texture > CreateExternalTexture(int64_t texture_id, fml::scoped_nsobject< NSObject< FlutterTexture >> texture) override
Creates an external texture proxy of the appropriate client rendering API.
Definition: ios_context_software.mm:32
ios_context.h
texture_id
int64_t texture_id
Definition: texture_registrar_unittests.cc:24
flutter::IOSContextSoftware::GetMainContext
sk_sp< GrDirectContext > GetMainContext() const override
Accessor for the Skia context associated with IOSSurfaces and the raster thread.
Definition: ios_context_software.mm:21