# CompositionOptions

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

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

```rust
struct CompositionOptions
```

Options of the composition renderer.

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

## Members

- [`use_region_dirty_rect_clipping`](#struct_field-use_region_dirty_rect_clipping)
- [`max_dirty_rects`](#struct_field-max_dirty_rects)
- [`dirty_rect_merge_eagerness`](#struct_field-dirty_rect_merge_eagerness)
- [`use_save_layer_root_clip`](#struct_field-use_save_layer_root_clip)
- [`region_dirty_rect_clipping`](#function-region_dirty_rect_clipping)

<a id="struct_field-use_region_dirty_rect_clipping"></a>

### use_region_dirty_rect_clipping

```rust
use_region_dirty_rect_clipping: Option<bool>
```

Enables more accurate tracking of dirty rects by utilizing regions if
supported by the underlying drawing context. `None` turns it on: only
`Some(false)` keeps the single dirty rectangle (a deviation, see
docs/porting/desktop-performance.md section 9.10).

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

<a id="struct_field-max_dirty_rects"></a>

### max_dirty_rects

```rust
max_dirty_rects: Option<i32>
```

The maximum number of dirty rects to track when region clip is in
use. Setting this to zero or a negative value removes the smarter
algorithm and uses the underlying drawing context region support
directly. The default value is 8.

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

<a id="struct_field-dirty_rect_merge_eagerness"></a>

### dirty_rect_merge_eagerness

```rust
dirty_rect_merge_eagerness: Option<f64>
```

Controls the eagerness of merging dirty rects. Unstable: the default
is subject to change.

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

<a id="struct_field-use_save_layer_root_clip"></a>

### use_save_layer_root_clip

```rust
use_save_layer_root_clip: Option<bool>
```

Enforces dirty contents to be rendered into an extra intermediate
surface before being applied onto the saved frame.

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

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

### region_dirty_rect_clipping

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

Whether a target tracks its dirty area as a set of rectangles clipped
with a region, when the drawing context supports regions. On unless
`use_region_dirty_rect_clipping` is `Some(false)`.

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

## Trait implementations

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

## Availability

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