- Add chandra-camera-isp.c (C/OpenMP) for Quad-Bayer unpack, CCM, and tone mapping, with a NumPy fallback when it is not built - Add non-blocking contrast-detection VCM autofocus, with lens subdev discovery on the sensor's I2C bus - Tune Quad-Bayer AE: a video-mode vblank cap, damped steps, and full analog gain before extending blanking - Record variable-frame-rate video through a streaming Matroska muxer, and count dropped frames - Ship libcamera IPA tuning files for imx376, imx519, and uncalibrated sensors - Map camera buffers by fd and sync them with dma-buf ioctls
This commit is contained in:
1 parent
851c39d827
commit
52b42890d6
34 files changed
+2851
-364
No files matched your search
@@ -341,6 +341,7 @@ pub fn ChandraCompositor::new(
|
||||
output_h : Int,
|
||||
) -> ChandraCompositor? {
|
||||
ignore(@font.install()) // Adwaita Mono; keeps the bitmap font if it's missing
|
||||
@raster.install_emoji_text(fn(cp, bold, mono) { @font.has_glyph(cp, bold, mono) })
|
||||
let server = match @wayland.WaylandServer::listen(socket_path, output_w, output_h) {
|
||||
Some(s) => s
|
||||
None => return None
|
||||
|
||||
@@ -298,3 +298,40 @@ test "desktop screenshots: icons, starfield, the Desktop tab" {
|
||||
}
|
||||
ignore(@sys.write_file_bytes("_build/desktop_settings.png", @renderer.encode_png(comp.compose_frame())))
|
||||
}
|
||||
|
||||
///|
|
||||
test "mobile tap on desktop icon with finger drift launches without moving any icon" {
|
||||
let socket_path = "/tmp/wayland-moon-desk-mobile-" + @sys.getpid().to_string() + ".sock"
|
||||
let comp = @host.ChandraCompositor::new(socket_path, @scene.ThemeTokens::moon_night(), 540, 1170).unwrap()
|
||||
comp.shell.apps.clear()
|
||||
for i = 0; i < 6; i = i + 1 {
|
||||
let id = "app" + i.to_string()
|
||||
comp.shell.apps.push({
|
||||
id,
|
||||
name: ["Files", "Browser", "Terminal", "Editor", "Mail", "Music"][i],
|
||||
comment: "",
|
||||
category: "",
|
||||
glyph: "",
|
||||
})
|
||||
comp.shell.exec.set(id, "true")
|
||||
}
|
||||
comp.shell.apps_dirty = true
|
||||
assert_true(comp.shell.set_desktop("icon-desktop"))
|
||||
ignore(comp.compose_frame())
|
||||
// At 540x1170 with 96px medium cells and 20px margin, app5 is at column 0, row 5: center (68, 548).
|
||||
// Tap with an 18 px touch-drift between press and release: must launch app5 and keep every icon in place.
|
||||
comp.handle_input(@nested.InputEvent::PointerMove(68.0, 548.0), 10U)
|
||||
comp.handle_input(@nested.InputEvent::PointerButton(272U, true), 11U)
|
||||
comp.handle_input(@nested.InputEvent::PointerMove(86.0, 548.0), 12U)
|
||||
comp.handle_input(@nested.InputEvent::PointerButton(272U, false), 13U)
|
||||
ignore(comp.compose_frame())
|
||||
assert_eq(comp.shell.recents[0], "app5")
|
||||
assert_eq(comp.shell.apps[0].id, "app5")
|
||||
let places = desk_setting(comp, "places")
|
||||
assert_true(places.contains("app0=0,0"))
|
||||
assert_true(places.contains("app5=0,5"))
|
||||
// A deliberate drag (> 50 px) to column 1, row 0 (center 164, 68) still moves app5 there.
|
||||
desk_drag(comp, 68, 548, 164, 68, 30U)
|
||||
assert_true(desk_setting(comp, "places").contains("app5=1,0"))
|
||||
comp.close()
|
||||
}
|
||||
@@ -129,3 +129,63 @@ test "the Wi-Fi and airplane switches, and status only without NetworkManager" {
|
||||
click_row(comp, 1, 20U)
|
||||
assert_eq(fake.actions.length(), n)
|
||||
}
|
||||
|
||||
///| Whether any pixel in `r` looks like Noto Color Emoji's olive-green turtle (`g > r && g > b + 40`).
|
||||
fn has_turtle_pixels(px : @renderer.Pixmap, r : @scene.Rect) -> Bool {
|
||||
for y = r.y; y < r.y + r.h; y = y + 1 {
|
||||
for x = r.x; x < r.x + r.w; x = x + 1 {
|
||||
match px.pixel(x, y) {
|
||||
Some(c) => {
|
||||
let cr = c.r.to_int()
|
||||
let cg = c.g.to_int()
|
||||
let cb = c.b.to_int()
|
||||
if cg > cr && cg > cb + 40 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
None => ()
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
///| Whether any Text draw op inside `ops` contains `sub`.
|
||||
fn ops_have_text(ops : Array[@scene.DrawOp], sub : String) -> Bool {
|
||||
for op in ops {
|
||||
match op {
|
||||
Text(_, _, s, _, _, _, _) | MonoText(_, _, s, _, _, _, _) =>
|
||||
if s.contains(sub) {
|
||||
return true
|
||||
}
|
||||
_ => ()
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
///|
|
||||
test "Wi-Fi SSID with turtle emoji survives wasm boundary and renders in colour" {
|
||||
let comp = new_comp("net-turtle")
|
||||
let fake = @network.FakeNet::new(
|
||||
{ ..net_status(), name: "🐢" },
|
||||
[
|
||||
{ ssid: "🐢", signal: 72, secured: true, active: true, saved: true },
|
||||
{ ssid: "🐢 5G", signal: 55, secured: true, active: false, saved: false },
|
||||
],
|
||||
)
|
||||
comp.shell.set_network_backend(fake as &@network.NetBackend)
|
||||
click_module(comp, "network", 1U)
|
||||
comp.damage.mark_full()
|
||||
let sg = comp.compose_scene().unwrap()
|
||||
assert_true(ops_have_text(sg.panel_ops, "🐢"))
|
||||
assert_true(ops_have_text(sg.panel_ops, "Connected to 🐢 (72%)"))
|
||||
assert_true(ops_have_text(sg.panel_ops, "🐢 5G"))
|
||||
let px = @renderer.render_scene(sg)
|
||||
let slot = comp.shell.slot_of("network")
|
||||
let btn = comp.shell.slot_rect(slot)
|
||||
let pop = comp.shell.slot_popup_rect(slot)
|
||||
assert_true(btn.w > 0 && pop.w > 0)
|
||||
assert_true(has_turtle_pixels(px, btn))
|
||||
assert_true(has_turtle_pixels(px, pop))
|
||||
}
|
||||
Reference in new issue
Block a user