Commit graph

16 commits

Author SHA1 Message Date
f38b9420ac B252: keep closed textures valid until the engine is done with them
Windows: closeTexture hands the texture to UnregisterTexture's callback and
frees its frame buffers there; frames pushed after close are dropped. Without
"recycle" the object is kept for the process lifetime (the session may still
hold its pointer); an engine that shuts down keeps its open textures the same
way. A duplicate createTexture key gets -1, getTexturePtr of an unknown key 0.

macOS: closeTexture drops the frame and closes the texture to later frames;
only "recycle" removes it from the plugin.

Linux: the frame handed to the engine last is freed at that engine's next
copy_pixels or once the engine has shut down, not at close: from Flutter 3.32
the raster thread can still be uploading it.

Tests: windows/test/run_tests.sh (plain, --asan, --tsan) and
linux/test/run_tests.sh (plain, --asan).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 03:19:05 +09:00
21pages
c615e9507a windows: avoid unnecessary memory allocation
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-11-27 03:48:28 +08:00
21pages
96ed6df4a9 remove switch rgba
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-11-26 22:02:57 +08:00
fufesou
8d66a7c55e
Refact/stride align (#8)
* rename row_align_bytes  to stride_align

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* trivail changes

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-03-03 09:46:33 +08:00
fufesou
873919902e
Feat/row align bytes (#7)
* better bytes alignment

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* debug macos

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* debug linux

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* windows switch_rgba

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* better switch_rgba

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-03-03 09:30:05 +08:00
fufesou
69a51033bf
Win bg fg buffer (#4)
* better frame available

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* fix win, bg fg buffers

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* swap -1

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-02-21 09:03:18 +08:00
fufesou
749acc2f87
fix win crash (#3)
* fix win crash

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* better lock guard

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-02-20 23:16:44 +08:00
Kingtous
44d3a78b9b bump: 0.0.6 2023-02-19 15:36:42 +08:00
Kingtous
e118e96341
win test commit (#2)
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Co-authored-by: fufesou <shuanglongchen@yeah.net>
Co-authored-by: fufesou <fufesou@users.noreply.github.com>
2023-02-18 20:39:00 +08:00
Kingtous
0f59fef831 feat: getTexturePtr 2023-02-18 00:53:26 +08:00
Kingtous
1a164ee5a0 feat: add onRgba c api on windows 2023-02-18 00:34:46 +08:00
Kingtous
7ab1554948 fix: add copy on windows 2023-02-17 14:34:38 +08:00
Kingtous
6a24ae2a85 bump: 0.0.3 2023-02-17 11:54:26 +08:00
Kingtous
1684b7655c feat: windows basic impl 2023-02-17 11:35:07 +08:00
Kingtous
59475c0020 opt: initial windows impl 2023-02-17 09:21:17 +08:00
Kingtous
b2bd5910e7 feat: init repo 2023-02-16 15:03:12 +08:00