| Flutter iOS Embedder |

Public Member Functions | List of all members
flutter::IOSContextMetalSkia Class Referencefinal

`#include <ios_context_metal_skia.h>`

Inheritance diagram for flutter::IOSContextMetalSkia:

## Public Member Functions
| IOSContextMetalSkia (MsaaSampleCount msaa_samples)
| ~IOSContextMetalSkia ()
fml::scoped_nsobject< FlutterDarwinContextMetalSkia > | GetDarwinContext () const
IOSRenderingBackend | GetBackend () const override
| Get the rendering backend used by this context. More...
sk_sp< GrDirectContext > | GetMainContext () const override
| Accessor for the Skia context associated with IOSSurfaces and the raster thread. More...
sk_sp< GrDirectContext > | GetResourceContext () const
Public Member Functions inherited from flutter::IOSContext
virtual | ~IOSContext ()
| Collects the context object. This must happen on the thread on which this object was created. More...
virtual std::shared_ptr< impeller::Context > | GetImpellerContext () const
MsaaSampleCount | GetMsaaSampleCount () const

## Additional Inherited Members
Static Public Member Functions inherited from flutter::IOSContext
static std::unique_ptr< IOSContext > | Create (IOSRenderingAPI api, IOSRenderingBackend backend, MsaaSampleCount msaa_samples, std::shared_ptr< const fml::SyncSwitch > is_gpu_disabled_sync_switch)
| Create an iOS context object capable of creating the on-screen and off-screen GPU context for use by Skia. More...
Protected Member Functions inherited from flutter::IOSContext
| IOSContext (MsaaSampleCount msaa_samples)

## Detailed Description

Definition at line 19 of file ios_context_metal_skia.h.

## Constructor & Destructor Documentation

## ◆ IOSContextMetalSkia()

flutter::IOSContextMetalSkia::IOSContextMetalSkia | ( | MsaaSampleCount | msaa_samples | ) |
| explicit

Definition at line 15 of file ios_context_metal_skia.mm.

15 : IOSContext(msaa_samples) {
16 darwin_context_metal_ = fml::scoped_nsobject<FlutterDarwinContextMetalSkia>{
17 [[FlutterDarwinContextMetalSkia alloc] initWithDefaultMTLDevice]};
18 }

## ◆ ~IOSContextMetalSkia()

flutter::IOSContextMetalSkia::~IOSContextMetalSkia | ( |  | ) |
| default

## Member Function Documentation

## ◆ GetBackend()

IOSRenderingBackend flutter::IOSContextMetalSkia::GetBackend | ( |  | ) | const
| override virtual

Get the rendering backend used by this context.

Returns
  The rendering backend.

Reimplemented from flutter::IOSContext.

Definition at line 26 of file ios_context_metal_skia.mm.

26 {
27 return IOSRenderingBackend::kSkia;
28 }

References flutter::kSkia.

## ◆ GetDarwinContext()

fml::scoped_nsobject< FlutterDarwinContextMetalSkia > flutter::IOSContextMetalSkia::GetDarwinContext | ( |  | ) | const

Definition at line 22 of file ios_context_metal_skia.mm.

22 {
23 return darwin_context_metal_;
24 }

## ◆ GetMainContext()

sk_sp< GrDirectContext > flutter::IOSContextMetalSkia::GetMainContext | ( |  | ) | const
| override virtual

Accessor for the Skia context associated with IOSSurfaces and the raster thread.

There can be any number of resource contexts but this is the one context that will be used by surfaces to draw to the screen from the raster thread.

Returns
  `nullptr` on failure.

Attention
  The software context doesn't have a Skia context, so this value will be nullptr.

See also
  For contexts which are used for offscreen work like loading textures see IOSContext::CreateResourceContext.

Implements flutter::IOSContext.

Definition at line 30 of file ios_context_metal_skia.mm.

30 {
31 return darwin_context_metal_.get().mainContext;
32 }

## ◆ GetResourceContext()

sk_sp< GrDirectContext > flutter::IOSContextMetalSkia::GetResourceContext | ( |  | ) | const

Definition at line 34 of file ios_context_metal_skia.mm.

34 {
35 return darwin_context_metal_.get().resourceContext;
36 }

The documentation for this class was generated from the following files:

- shell/platform/darwin/ios/ios_context_metal_skia.h
- shell/platform/darwin/ios/ios_context_metal_skia.mm

flutter::IOSRenderingBackend::kSkia
@ kSkia
flutter::IOSContext::IOSContext
IOSContext(MsaaSampleCount msaa_samples)
Definition: ios_context.mm:17