#include <ios_context_metal_impeller.h>
◆ IOSContextMetalImpeller()
flutter::IOSContextMetalImpeller::IOSContextMetalImpeller |
( |
const std::shared_ptr< const fml::SyncSwitch > & |
is_gpu_disabled_sync_switch | ) |
|
|
explicit |
◆ ~IOSContextMetalImpeller()
flutter::IOSContextMetalImpeller::~IOSContextMetalImpeller |
( |
| ) |
|
◆ CreateExternalTexture()
Creates an external texture proxy of the appropriate client rendering API.
- Parameters
-
[in] | texture_id | The texture identifier |
[in] | texture | The texture |
- Returns
- The texture proxy if the rendering backend supports embedder provided external textures.
Implements flutter::IOSContext.
◆ CreateResourceContext()
Create a resource context for use on the IO task runner. This resource context is used by Skia to upload texture to asynchronously and collect resources that are no longer needed on the render task runner.
- Attention
- Client rendering APIs for which a GrDirectContext cannot be realized (software rendering), this method will always return null.
- Returns
- A non-null Skia context on success.
nullptr
on failure.
Implements flutter::IOSContext.
◆ GetBackend()
Get the rendering backend used by this context.
- Returns
- The rendering backend.
Reimplemented from flutter::IOSContext.
◆ GetImpellerContext()
std::shared_ptr< impeller::Context > flutter::IOSContextMetalImpeller::GetImpellerContext |
( |
| ) |
const |
|
overrideprivatevirtual |
◆ GetMainContext()
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.
◆ GetResourceContext()
◆ MakeCurrent()
std::unique_ptr< GLContextResult > flutter::IOSContextMetalImpeller::MakeCurrent |
( |
| ) |
|
|
overrideprivatevirtual |
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.
- Attention
- Client rendering APIs that have no-concept of thread local bindings (anything that is not OpenGL) will always return
true
.
-
Client rendering APIs for which a GrDirectContext cannot be created (software rendering) will always return
false
.
-
This binds the on-screen context to the current thread. To bind the off-screen context to the thread, use the
ResoruceMakeCurrent
method instead.
-
Only one context may be bound to a thread at any given time. Making a binding on a thread, clears the old binding.
- Returns
- A GLContextResult that represents the result of the method. The GetResult() returns a bool that indicates If the on-screen context could be bound to the current thread.
Implements flutter::IOSContext.
The documentation for this class was generated from the following file: