Test soft blit

This commit is contained in:
Wildan M 2026-04-10 12:53:41 +07:00
parent 7626d0cc4f
commit 67ef832c1a
No known key found for this signature in database
GPG Key ID: 01AC53185C679C79
12 changed files with 453 additions and 25 deletions

View File

@ -1,5 +1,6 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/orbital.git"
git = "https://gitlab.redox-os.org/willnode/orbital.git"
branch = "soft-blit"
[build]
template = "cargo"

View File

@ -1,5 +1,6 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/liborbital.git"
git = "https://gitlab.redox-os.org/willnode/liborbital.git"
branch = "soft-blit"
[build]
template = "custom"

View File

@ -1,5 +1,6 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/sdl1.2.git"
git = "https://gitlab.redox-os.org/willnode/sdl1.2.git"
branch = "soft-blit"
[build]
template = "custom"

View File

@ -16,6 +16,7 @@ COOKBOOK_CONFIGURE_FLAGS+=(
bash_cv_func_sigsetjmp=no
bash_cv_getenv_redef=no
--enable-static-link # This ensures loadables are not built, which will fail
--enable-multibyte
)
COOKBOOK_MAKE_JOBS=1 # workaround for parallel make bugs
cookbook_configure

View File

@ -1,6 +1,9 @@
[source]
git = "https://github.com/pop-os/cosmic-edit.git"
rev = "epoch-1.0.8"
patches = [
"redox.patch"
]
[build]
template = "custom"

View File

@ -0,0 +1,132 @@
diff --git a/Cargo.lock b/Cargo.lock
index 968b42d..4c1ca89 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1429,7 +1429,7 @@ dependencies = [
"cosmic-settings-daemon",
"dirs 6.0.0",
"futures-util",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"known-folders",
"notify",
"ron 0.12.0",
@@ -3288,7 +3288,7 @@ dependencies = [
"dnd",
"iced_accessibility",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"iced_renderer",
"iced_widget",
"iced_winit",
@@ -3310,7 +3310,7 @@ dependencies = [
[[package]]
name = "iced_core"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb971b832c057f23"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
dependencies = [
"bitflags 2.11.0",
"bytes",
@@ -3331,6 +3331,19 @@ dependencies = [
"window_clipboard",
]
+[[package]]
+name = "iced_futures"
+version = "0.14.0-dev"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
+dependencies = [
+ "futures",
+ "iced_core",
+ "log",
+ "rustc-hash 2.1.1",
+ "wasm-bindgen-futures",
+ "wasm-timer",
+]
+
[[package]]
name = "iced_futures"
version = "0.14.0-dev"
@@ -3360,14 +3373,14 @@ dependencies = [
[[package]]
name = "iced_graphics"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb971b832c057f23"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
dependencies = [
"bitflags 2.11.0",
"bytemuck",
"cosmic-text",
"half",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/willnode/iced?branch=cosmic-orbital)",
"image",
"kamadak-exif",
"log",
@@ -3400,7 +3413,7 @@ dependencies = [
"cosmic-client-toolkit",
"dnd",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"raw-window-handle",
"thiserror 1.0.69",
"window_clipboard",
@@ -3409,7 +3422,7 @@ dependencies = [
[[package]]
name = "iced_tiny_skia"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb971b832c057f23"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
dependencies = [
"bytemuck",
"cosmic-text",
@@ -3479,7 +3492,7 @@ source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb
dependencies = [
"cosmic-client-toolkit",
"dnd",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"iced_graphics",
"iced_runtime",
"log",
@@ -4554,7 +4567,7 @@ dependencies = [
"i18n-embed-fl",
"iced",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"iced_renderer",
"iced_runtime",
"iced_tiny_skia",
@@ -7094,7 +7107,7 @@ dependencies = [
[[package]]
name = "softbuffer"
version = "0.4.1"
-source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-4.0#a3f77e251e7422803f693df6e3fc313c010c4dcb"
+source = "git+https://github.com/willnode/softbuffer?branch=cosmic-orbital#acd19a58e96e6e729a2ce6c334cbb4cdef84f1dd"
dependencies = [
"as-raw-xcb-connection",
"bytemuck",
diff --git a/Cargo.toml b/Cargo.toml
index 9ae4b0f..9633bcb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -70,6 +70,14 @@ debug = true
onig = { git = "https://github.com/rust-onig/rust-onig.git", branch = "main" }
onig_sys = { git = "https://github.com/rust-onig/rust-onig.git", branch = "main" }
+[patch.'https://github.com/pop-os/softbuffer']
+softbuffer = { git = "https://github.com/willnode/softbuffer", branch = "cosmic-orbital" }
+
+[patch.'https://github.com/pop-os/libcosmic']
+iced_tiny_skia = { git = "https://github.com/willnode/iced", branch = "cosmic-orbital" }
+iced_graphics = { git = "https://github.com/willnode/iced", branch = "cosmic-orbital" }
+iced_core = { git = "https://github.com/willnode/iced", branch = "cosmic-orbital" }
+
# [patch.'https://github.com/pop-os/libcosmic']
# libcosmic = { path = "../libcosmic" }
# cosmic-config = { path = "../libcosmic/cosmic-config" }

View File

@ -1,6 +1,9 @@
[source]
git = "https://github.com/pop-os/cosmic-files.git"
rev = "epoch-1.0.8"
patches = [
"redox.patch"
]
[build]
template = "custom"

View File

@ -0,0 +1,132 @@
diff --git a/Cargo.lock b/Cargo.lock
index 8db9972..c115180 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1428,7 +1428,7 @@ dependencies = [
"cosmic-settings-daemon",
"dirs 6.0.0",
"futures-util",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"known-folders",
"notify",
"ron 0.12.0",
@@ -3139,7 +3139,7 @@ dependencies = [
"dnd",
"iced_accessibility",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"iced_renderer",
"iced_widget",
"iced_winit",
@@ -3161,7 +3161,7 @@ dependencies = [
[[package]]
name = "iced_core"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb971b832c057f23"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
dependencies = [
"bitflags 2.11.0",
"bytes",
@@ -3182,6 +3182,19 @@ dependencies = [
"window_clipboard",
]
+[[package]]
+name = "iced_futures"
+version = "0.14.0-dev"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
+dependencies = [
+ "futures",
+ "iced_core",
+ "log",
+ "rustc-hash 2.1.1",
+ "wasm-bindgen-futures",
+ "wasm-timer",
+]
+
[[package]]
name = "iced_futures"
version = "0.14.0-dev"
@@ -3211,14 +3224,14 @@ dependencies = [
[[package]]
name = "iced_graphics"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb971b832c057f23"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
dependencies = [
"bitflags 2.11.0",
"bytemuck",
"cosmic-text",
"half",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/willnode/iced?branch=cosmic-orbital)",
"image",
"kamadak-exif",
"log",
@@ -3251,7 +3264,7 @@ dependencies = [
"cosmic-client-toolkit",
"dnd",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"raw-window-handle",
"thiserror 1.0.69",
"window_clipboard",
@@ -3260,7 +3273,7 @@ dependencies = [
[[package]]
name = "iced_tiny_skia"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb971b832c057f23"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
dependencies = [
"bytemuck",
"cosmic-text",
@@ -3330,7 +3343,7 @@ source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb
dependencies = [
"cosmic-client-toolkit",
"dnd",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"iced_graphics",
"iced_runtime",
"log",
@@ -4427,7 +4440,7 @@ dependencies = [
"i18n-embed-fl",
"iced",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"iced_renderer",
"iced_runtime",
"iced_tiny_skia",
@@ -6898,7 +6911,7 @@ dependencies = [
[[package]]
name = "softbuffer"
version = "0.4.1"
-source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-4.0#a3f77e251e7422803f693df6e3fc313c010c4dcb"
+source = "git+https://github.com/willnode/softbuffer?branch=cosmic-orbital#acd19a58e96e6e729a2ce6c334cbb4cdef84f1dd"
dependencies = [
"as-raw-xcb-connection",
"bytemuck",
diff --git a/Cargo.toml b/Cargo.toml
index 3786a9c..a83fe85 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -138,6 +138,14 @@ fastrand = "2"
test-log = "0.2"
tokio = { version = "1", features = ["rt", "macros"] }
+[patch.'https://github.com/pop-os/softbuffer']
+softbuffer = { git = "https://github.com/willnode/softbuffer", branch = "cosmic-orbital" }
+
+[patch.'https://github.com/pop-os/libcosmic']
+iced_tiny_skia = { git = "https://github.com/willnode/iced", branch = "cosmic-orbital" }
+iced_graphics = { git = "https://github.com/willnode/iced", branch = "cosmic-orbital" }
+iced_core = { git = "https://github.com/willnode/iced", branch = "cosmic-orbital" }
+
# [patch.'https://github.com/pop-os/cosmic-text']
# cosmic-text = { path = "../cosmic-text" }

View File

@ -1,6 +1,9 @@
[source]
git = "https://github.com/pop-os/cosmic-term.git"
rev = "epoch-1.0.8"
patches = [
"redox.patch"
]
[build]
template = "custom"

View File

@ -0,0 +1,131 @@
diff --git a/Cargo.lock b/Cargo.lock
index 255a7db..06d2aba 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1453,7 +1453,7 @@ dependencies = [
"cosmic-settings-daemon",
"dirs 6.0.0",
"futures-util",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"known-folders",
"notify",
"ron 0.12.0",
@@ -3119,7 +3119,7 @@ dependencies = [
"dnd",
"iced_accessibility",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"iced_renderer",
"iced_widget",
"iced_winit",
@@ -3141,7 +3141,7 @@ dependencies = [
[[package]]
name = "iced_core"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb971b832c057f23"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
dependencies = [
"bitflags 2.11.0",
"bytes",
@@ -3162,6 +3162,19 @@ dependencies = [
"window_clipboard",
]
+[[package]]
+name = "iced_futures"
+version = "0.14.0-dev"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
+dependencies = [
+ "futures",
+ "iced_core",
+ "log",
+ "rustc-hash 2.1.1",
+ "wasm-bindgen-futures",
+ "wasm-timer",
+]
+
[[package]]
name = "iced_futures"
version = "0.14.0-dev"
@@ -3191,14 +3204,14 @@ dependencies = [
[[package]]
name = "iced_graphics"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb971b832c057f23"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
dependencies = [
"bitflags 2.11.0",
"bytemuck",
"cosmic-text",
"half",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/willnode/iced?branch=cosmic-orbital)",
"image",
"kamadak-exif",
"log",
@@ -3231,7 +3244,7 @@ dependencies = [
"cosmic-client-toolkit",
"dnd",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"raw-window-handle",
"thiserror 1.0.69",
"window_clipboard",
@@ -3240,7 +3253,7 @@ dependencies = [
[[package]]
name = "iced_tiny_skia"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb971b832c057f23"
+source = "git+https://github.com/willnode/iced?branch=cosmic-orbital#82cbe7c45dabefe2d07db8af9e00c029dc2b7e30"
dependencies = [
"bytemuck",
"cosmic-text",
@@ -3310,7 +3323,7 @@ source = "git+https://github.com/pop-os/libcosmic.git#384e8f6e219bb458720eafa5bb
dependencies = [
"cosmic-client-toolkit",
"dnd",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"iced_graphics",
"iced_runtime",
"log",
@@ -4386,7 +4399,7 @@ dependencies = [
"i18n-embed-fl",
"iced",
"iced_core",
- "iced_futures",
+ "iced_futures 0.14.0-dev (git+https://github.com/pop-os/libcosmic.git)",
"iced_renderer",
"iced_runtime",
"iced_tiny_skia",
@@ -6863,7 +6876,7 @@ dependencies = [
[[package]]
name = "softbuffer"
version = "0.4.1"
-source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-4.0#a3f77e251e7422803f693df6e3fc313c010c4dcb"
+source = "git+https://github.com/willnode/softbuffer?branch=cosmic-orbital#acd19a58e96e6e729a2ce6c334cbb4cdef84f1dd"
dependencies = [
"as-raw-xcb-connection",
"bytemuck",
diff --git a/Cargo.toml b/Cargo.toml
index f0a89be..bd2d241 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -66,6 +66,13 @@ password_manager = ["secret-service", "thiserror", "secstr"]
inherits = "release"
debug = true
+[patch.'https://github.com/pop-os/softbuffer']
+softbuffer = { git = "https://github.com/willnode/softbuffer", branch = "cosmic-orbital" }
+
+[patch.'https://github.com/pop-os/libcosmic']
+iced_tiny_skia = { git = "https://github.com/willnode/iced", branch = "cosmic-orbital" }
+iced_graphics = { git = "https://github.com/willnode/iced", branch = "cosmic-orbital" }
+iced_core = { git = "https://github.com/willnode/iced", branch = "cosmic-orbital" }
# [patch.'https://github.com/pop-os/libcosmic']
# libcosmic = { path = "../libcosmic" }

View File

@ -1,14 +1,13 @@
[source]
tar = "https://www.nano-editor.org/dist/v7/nano-7.2.tar.xz"
[build]
template = "custom"
template = "configure"
configureflags = [
"--enable-utf8"
]
dependencies = [
"ncursesw",
]
script = """
DYNAMIC_INIT
cookbook_configure
"""
[package]
dependencies = [

View File

@ -1,6 +1,6 @@
diff -ruwN source-old/src/dummy_driver.c source/src/dummy_driver.c
--- source-old/src/dummy_driver.c 2023-05-07 14:27:44.000000000 -0600
+++ source/src/dummy_driver.c 2025-10-29 11:13:11.863430241 -0600
diff -ruwN source/src/dummy_driver.c source-new/src/dummy_driver.c
--- source/src/dummy_driver.c 2023-05-08 03:27:44.000000000 +0700
+++ source-new/src/dummy_driver.c 2026-04-10 12:32:15.781945854 +0700
@@ -39,6 +39,7 @@
/* These need to be checked */
#include <X11/X.h>
@ -219,7 +219,7 @@ diff -ruwN source-old/src/dummy_driver.c source/src/dummy_driver.c
pScrn->vtSema = FALSE;
pScreen->CloseScreen = dPtr->CloseScreen;
return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
@@ -1009,6 +1135,31 @@
@@ -1009,6 +1135,52 @@
Atom VFB_PROP = 0;
#define VFB_PROP_NAME "VFB_IDENT"
@ -232,18 +232,39 @@ diff -ruwN source-old/src/dummy_driver.c source/src/dummy_driver.c
+ dPtr->BlockHandler = pScreen->BlockHandler;
+ pScreen->BlockHandler = DUMMYBlockHandler;
+
+ if (dPtr->damage) {
+ RegionPtr dirty = DamageRegion(dPtr->damage);
+ if (RegionNil(dirty)) {
+ // Do not sync if damage empty
+ return;
+ }
+ DamageEmpty(dPtr->damage);
+ if (!dPtr->orb_window) {
+ return;
+ }
+
+ if (dPtr->orb_window) {
+ //TODO: use damage region?
+ //printf("orb_window_sync %p\n", dPtr->orb_window);
+ if (dPtr->damage) {
+ RegionPtr dirty = DamageRegion(dPtr->damage);
+
+ if (!RegionNil(dirty)) {
+ int nrects = RegionNumRects(dirty);
+ BoxPtr pBox = RegionRects(dirty);
+
+ if (nrects > 0) {
+ int32_t *rects = (int32_t *)malloc(nrects * 4 * sizeof(int32_t));
+
+ if (rects) {
+ for (int i = 0; i < nrects; i++) {
+ rects[i * 4 + 0] = (int32_t)pBox[i].x1;
+ rects[i * 4 + 1] = (int32_t)pBox[i].y1;
+ rects[i * 4 + 2] = (int32_t)(pBox[i].x2 - pBox[i].x1);
+ rects[i * 4 + 3] = (int32_t)(pBox[i].y2 - pBox[i].y1);
+ }
+
+ orb_window_update_rects(dPtr->orb_window, rects, (uintptr_t)nrects);
+
+ free(rects);
+ } else {
+ orb_window_sync(dPtr->orb_window);
+ }
+ }
+
+ DamageEmpty(dPtr->damage);
+ }
+ } else {
+ orb_window_sync(dPtr->orb_window);
+ }
+}
@ -251,9 +272,9 @@ diff -ruwN source-old/src/dummy_driver.c source/src/dummy_driver.c
static Bool
DUMMYCreateWindow(WindowPtr pWin)
{
diff -ruwN source-old/src/dummy.h source/src/dummy.h
--- source-old/src/dummy.h 2023-05-07 14:27:44.000000000 -0600
+++ source/src/dummy.h 2025-10-29 10:11:23.172517830 -0600
diff -ruwN source/src/dummy.h source-new/src/dummy.h
--- source/src/dummy.h 2023-05-08 03:27:44.000000000 +0700
+++ source-new/src/dummy.h 2026-03-05 04:27:37.507961929 +0700
@@ -4,6 +4,7 @@
#include "xf86_OSproc.h"