mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Reduce redundant smart blur offsets
This commit is contained in:
1 parent
878d5fa717
commit
475dcbcad1
1 file changed
+4
-2
@@ -110,12 +110,14 @@ fn offset_fast_path_matches_the_per_channel_oracle() {
|
||||
for (mode, n, alpha) in layouts {
|
||||
let src = image(win, n, alpha);
|
||||
let ctx = Ctx { bounds: win, mode, alpha };
|
||||
for radius in [0.1f32, 1.0, 3.0, 12.0, 17.5] {
|
||||
// Centre only, unit stride, and a coarse stride for both qualities. At 13 the inner
|
||||
// rectangle still has pixels, so coarse offsets exercise the fast path too.
|
||||
for radius in [0.1f32, 3.0, 13.0] {
|
||||
let ri = f32::ceil(radius) as i32;
|
||||
// The usual tile (the window less the halo), the whole window, and one sticking out of it.
|
||||
let inner = Rect::new(win.x0 + ri, win.y0 + ri, win.x1 - ri, win.y1 - ri);
|
||||
for out in [inner, win, Rect::new(-12, -9, 10, 8), Rect::EMPTY] {
|
||||
// Quality only sets the offset stride: Low a coarse one, High every offset at these radii (#15652).
|
||||
// Quality selects the offset stride; both paths are compared to the oracle.
|
||||
for quality in [BlurQuality::Low, BlurQuality::High] {
|
||||
for sm in [SmartBlurMode::Normal, SmartBlurMode::EdgeOnly, SmartBlurMode::OverlayEdge] {
|
||||
for threshold in [8.0, 60.0] {
|
||||
|
||||
Reference in new issue
Block a user