# TextureRendererHost

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-media/struct-texturerendererhost/

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

```rust
struct TextureRendererHost
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L53)

## Members

- [`new`](#function-new)
- [`output`](#function-output)
- [`set_active`](#function-set_active)
- [`activate_if_needed`](#function-activate_if_needed)
- [`clear_output`](#function-clear_output)
- [`viewport`](#function-viewport)
- [`has_pending_work`](#function-has_pending_work)
- [`set_schedule`](#function-set_schedule)
- [`invalidate`](#function-invalidate)
- [`resize`](#function-resize)
- [`render`](#function-render)
- [`viewport_point`](#function-viewport_point)

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

### new

```rust
fn new(renderer: Rc<dyn TextureRenderer>, source: u64) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L73)

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

### output

```rust
fn output(self: &Self) -> Arc<FrameMailbox>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L89)

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

### set_active

```rust
fn set_active(self: &Self, active: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L92)

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

### activate_if_needed

```rust
fn activate_if_needed(self: &Self)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L112)

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

### clear_output

```rust
fn clear_output(self: &Self)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L117)

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

### viewport

```rust
fn viewport(self: &Self) -> RendererViewport
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L130)

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

### has_pending_work

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

Whether admitted work or an invalidation still needs a scheduling tick.
Clean static hosts can sleep until a source/layout notification arrives.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L135)

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

### set_schedule

```rust
fn set_schedule(self: &Self, schedule: RenderSchedule)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L142)

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

### invalidate

```rust
fn invalidate(self: &Self)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L146)

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

### resize

```rust
fn resize(self: &Self, width: f64, height: f64, scale: f64, max_dimension: u32) -> Result<(), MediaError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L149)

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

### render

```rust
fn render(self: &Self, inputs: Vec<FrameLease>) -> Option<MediaFuture<()>>
```

The existing render scheduler calls this once per presentation opportunity.
Hidden, zero-sized, clean or already-busy hosts do not schedule work.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L198)

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

### viewport_point

```rust
fn viewport_point(self: &Self, x: f64, y: f64, logical_width: f64, logical_height: f64) -> Option<(f64, f64)>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media/renderer.rs#L272)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`

## Availability

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