Commit graph

9 commits

Author SHA1 Message Date
Tobias Hunger
a8f912900b janitor: Fix warnings in nightly about redandant use 2024-02-19 17:05:21 +01:00
Guilhem Vallat
5cf1a45e41 Remove duplicated geometry properties from items 2023-09-13 16:08:37 +02:00
Simon Hausmann
91d0747d06 Make use of the ItemCache more robust when the window scale factor changes
Previously, all the closures passed to `get_or_update_cache_entry` would
have to make sure that the scale factor is an included dependency. This
is error prone, as the parent commits show.

Instead, this change adds a property tracker to each ItemCache and lets
the renderer clear the cache if the scale factor changes.

Strictly speaking this may delete too many entries from the cache (not
all depend on the scale factor), but on the other hand this doesn't
happen very often so we trade robustness over efficiency.
2023-08-16 16:37:07 +02:00
Simon Hausmann
4881bd1a87 Fix box-shadow cache not being invalidate when the scale factor changes
Include the scale factor in the dependency tracker of the item cache used for box shadows.
2023-08-16 16:37:07 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
Olivier Goffart
11dea135f7 Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs (#2888) 2023-06-15 11:20:50 +02:00
Olivier Goffart
b4e5345a7e Femtovg: fix panic when rendering layer or shadow with negative size
Reproducer:

```
export component Test {
    width: 200px;
    height: 200px;
    Rectangle {
        clip: true;
        background: red;
        border-radius: 5px;
        height: -12px; //<- negative size
        width: 100%;
        Rectangle { background: green; }
        drop-shadow-color: #8888;
        drop-shadow-blur: 5px;
    }
}

```
2023-03-27 20:52:37 +02:00
Simon Hausmann
2fd8bf426a Move the box shadow cache helpers to core::graphics::boxshadowcache
This way the box shadow cache can also be used from the Skia renderer,
which is to be moved into a different crate.
2022-12-09 09:03:27 +01:00
Renamed from internal/backends/winit/renderer/boxshadowcache.rs (Browse further)