G26: keep Windows textures alive through asynchronous unregister
Retain closed raw-pointer identities for late frames, release frame buffers after engine completion, and serialize termination with decoded frame writes. Add native regression controls for held raster buffers, inline completion, failed raster posts, missing registrations, teardown and concurrent closure. B252; Apache-2.0 dependency license and upstream history preserved.
This commit is contained in:
parent
8cd34a80ff
commit
50efc18ec5
10 changed files with 1268 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Modified by the Kitedesk fork (2026, B212): closeTexture takes `recycle`.
|
||||
// Modified by the Kitedesk fork (2026, B212/B252): closeTexture ownership.
|
||||
import 'dart:typed_data';
|
||||
|
||||
export './texture_rgba_ffi.dart' show Native;
|
||||
|
|
@ -20,8 +20,12 @@ class TextureRgbaRenderer {
|
|||
///
|
||||
/// Pass [recycle] = true only when nothing calls `onRgba` with the pointer
|
||||
/// from [getTexturePtr] any more. On Linux the texture is then kept for the
|
||||
/// next [createTexture] of the same window instead of being leaked
|
||||
/// (Kitedesk fork, B212); other platforms ignore it.
|
||||
/// next [createTexture] of the same window (Kitedesk fork, B212).
|
||||
/// On Windows it may be destroyed only after the engine finishes unregistering
|
||||
/// it. Without [recycle], Windows retains its closed identity for the process
|
||||
/// lifetime so late raw-pointer frames cannot reach freed or reused memory;
|
||||
/// its frame buffers are freed after unregistering (Kitedesk fork, B252).
|
||||
/// Other platforms ignore [recycle].
|
||||
///
|
||||
/// @return a boolean to indicate whether the operation is sucessfully executed.
|
||||
Future<bool> closeTexture(int key, {bool recycle = false}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue