Flutter Engine
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 
5 #import "flutter/shell/platform/darwin/ios/ios_context_software.h"
6 
7 namespace flutter {
8 
10 
11 // |IOSContext|
13 
14 // |IOSContext|
16  return nullptr;
17 }
18 
19 // |IOSContext|
20 sk_sp<GrDirectContext> IOSContextSoftware::GetMainContext() const {
21  return nullptr;
22 }
23 
24 // |IOSContext|
25 std::unique_ptr<GLContextResult> IOSContextSoftware::MakeCurrent() {
26  // This only makes sense for context that need to be bound to a specific thread.
27  return std::make_unique<GLContextDefaultResult>(false);
28 }
29 
30 // |IOSContext|
32  int64_t texture_id,
33  fml::scoped_nsobject<NSObject<FlutterTexture>> texture) {
34  // Don't use FML for logging as it will contain engine specific details. This is a user facing
35  // message.
36  NSLog(@"Flutter: Attempted to composite external texture sources using the software backend. "
37  @"This backend is only used on simulators. This feature is only available on actual "
38  @"devices where OpenGL or Metal is used for rendering.");
39 
40  // Not supported in this backend.
41  return nullptr;
42 }
43 
44 } // namespace flutter
G_BEGIN_DECLS FlTexture * texture
int64_t texture_id
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.
sk_sp< GrDirectContext > GetMainContext() const override
Accessor for the Skia context associated with IOSSurfaces and the raster thread.
std::unique_ptr< GLContextResult > MakeCurrent() override
When using client rendering APIs whose contexts need to be bound to a specific thread, the engine will call this method to give the on-screen context a chance to bind to the current thread.
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...