# ICompositionGpuInterop

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/composition/trait-icompositiongpuinterop/

**trait** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
trait ICompositionGpuInterop
```

The import of GPU objects created outside of the framework into the
compositor.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L11)

## Members

- [`render_compositor`](#function-render_compositor)
- [`shared_context_id`](#function-shared_context_id)
- [`shared_context_generation`](#function-shared_context_generation)
- [`supported_image_handle_types`](#function-supported_image_handle_types)
- [`supported_semaphore_types`](#function-supported_semaphore_types)
- [`get_synchronization_capabilities`](#function-get_synchronization_capabilities)
- [`import_shared_image`](#function-import_shared_image)
- [`import_semaphore`](#function-import_semaphore)
- [`import_shared_semaphore`](#function-import_shared_semaphore)
- [`is_lost`](#function-is_lost)
- [`device_luid`](#function-device_luid)
- [`set_device_luid`](#function-set_device_luid)
- [`device_uuid`](#function-device_uuid)
- [`set_device_uuid`](#function-set_device_uuid)

<a id="function-render_compositor"></a>

### render_compositor

```rust
fn render_compositor(self: &Self) -> Option<Rc<super::Compositor>>
```

Compositor whose render thread owns this interop context. Custom
interop implementations may decline native producer jobs.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L14)

<a id="function-shared_context_id"></a>

### shared_context_id

```rust
fn shared_context_id(self: &Self) -> Option<u64>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L17)

<a id="function-shared_context_generation"></a>

### shared_context_generation

```rust
fn shared_context_generation(self: &Self) -> u64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L20)

<a id="function-supported_image_handle_types"></a>

### supported_image_handle_types

```rust
fn supported_image_handle_types(self: &Self) -> Vec<String>
```

Returns the list of image handle types supported by the current GPU backend, see `KnownPlatformGraphicsExternalImageHandleTypes`

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L24)

<a id="function-supported_semaphore_types"></a>

### supported_semaphore_types

```rust
fn supported_semaphore_types(self: &Self) -> Vec<String>
```

Returns the list of semaphore types supported by the current GPU backend, see `KnownPlatformGraphicsExternalSemaphoreHandleTypes`

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L27)

<a id="function-get_synchronization_capabilities"></a>

### get_synchronization_capabilities

```rust
fn get_synchronization_capabilities(self: &Self, image_handle_type: &str) -> CompositionGpuImportedImageSynchronizationCapabilities
```

Returns the supported ways to synchronize access to the imported GPU image

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L37)

<a id="function-import_shared_image"></a>

### import_shared_image

```rust
fn import_shared_image(self: &Self, image: Arc<dyn ICompositionImportableSharedGpuContextImage>) -> Rc<dyn ICompositionImportedGpuImage>
```

Asynchronously imports a texture. The returned object is immediately usable.
If import operation fails, the caller is responsible for destroying the handle

`image` is an image that belongs to the same GPU context or the same GPU context sharing group as one used by compositor

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L53)

<a id="function-import_semaphore"></a>

### import_semaphore

```rust
fn import_semaphore(self: &Self, handle: Rc<dyn IPlatformHandle>) -> Rc<dyn ICompositionImportedGpuSemaphore>
```

Asynchronously imports a semaphore object. The returned object is immediately usable.
If import operation fails, the caller is responsible for destroying the handle

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L60)

<a id="function-import_shared_semaphore"></a>

### import_shared_semaphore

```rust
fn import_shared_semaphore(self: &Self, image: Rc<dyn ICompositionImportableSharedGpuContextSemaphore>) -> Rc<dyn ICompositionImportedGpuImage>
```

Asynchronously imports a semaphore object. The returned object is immediately usable.

`image` is a semaphore that belongs to the same GPU context or the same GPU context sharing group as one used by compositor

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L68)

<a id="function-is_lost"></a>

### is_lost

```rust
fn is_lost(self: &Self) -> bool
```

Indicates if the device context this instance is associated with is no longer available

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L74)

<a id="function-device_luid"></a>

### device_luid

```rust
fn device_luid(self: &Self) -> Option<Vec<u8>>
```

The LUID of the graphics adapter used by the compositor

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L77)

<a id="function-set_device_luid"></a>

### set_device_luid

```rust
fn set_device_luid(self: &Self, value: Option<Vec<u8>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L79)

<a id="function-device_uuid"></a>

### device_uuid

```rust
fn device_uuid(self: &Self) -> Option<Vec<u8>>
```

The UUID of the graphics adapter used by the compositor

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L82)

<a id="function-set_device_uuid"></a>

### set_device_uuid

```rust
fn set_device_uuid(self: &Self, value: Option<Vec<u8>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_external_memory.rs#L84)

## Trait implementations

- [`ICompositionGpuInterop`](/docs/0.5.0/api/ferroui-base/rendering/composition/trait-icompositiongpuinterop/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
