Display lists

This commit is contained in:
James Babcock committed 2026-09-22 00:25:40 -07:00
1 parent a7af84e231
commit 4320021222
44 files changed
+823 -284

No files matched your search

+2 -27
View File
@@ -2467,7 +2467,7 @@ class DashboardController {
beginRenderPass(!wantFreshData);
const paintStartedAtMs = Date.now();
const planes = frameTimings.span(frameId, "paint", () =>
frameTimings.runWithFrame(frameId, () => shell.paintSurface()),
frameTimings.runWithFrame(frameId, () => shell.paintScene()),
);
const paintMs = Date.now() - paintStartedAtMs;
const paintUsedStaleData = endRenderPass();
@@ -2484,32 +2484,7 @@ class DashboardController {
frameTimings.finishFrame(frameId, "discarded: shell render with no display target");
return;
}
// A shell overlay that dims what it covers (a context menu) must dim the
// window surfaces too, which live below the shell surface in the
// compositor: forward the factor before this frame composites.
const underlayDim = shell.underlayDim();
if (underlayDim !== this.appliedUnderlayDim) {
this.appliedUnderlayDim = underlayDim;
await display.setUnderlayDim(SHELL_SURFACE_Z_ORDER, underlayDim);
}
const fingerprint = frameTimings.span(frameId, "fingerprint", () => planesFingerprint(planes));
const { image, draws } = frameTimings.span(frameId, "flatten", () => flattenPlanesWithDraws(planes));
const buffer = frameTimings.span(frameId, "to8bpp", () => image.to8bppBuffer());
const preparedDraws = frameTimings.span(frameId, "prepareFrameDraws", () => prepareFrameDraws(draws));
// Spanned because the bridge serializes Java calls: a frame can sit here
// behind another surface's submission, which is otherwise an unexplained
// jump between the paint spans and the composite.
await frameTimings.spanAsync(frameId, "submit", () =>
display.submitSurfaceFrame(
SHELL_SURFACE_ID,
buffer,
{ x: 0, y: 0, width: image.width, height: image.height },
fingerprint,
paintMs,
frameId,
preparedDraws,
),
);
await frameTimings.spanAsync(frameId, "submit", () => display.submitShellScene(planes, paintMs, frameId));
// Backpressure: the next shell render waits for this one to reach the
// glasses. Timing out here means the loop was blocked for the full timeout
// and any input arriving meanwhile had its chrome repaint delayed, so say
+14
View File
@@ -0,0 +1,14 @@
/** Adapter for raster-only senders; optimized legacy layouts remain internal to the phone. */
export function drawMessages(payload: Uint8Array, width = 640, height = 480): Uint8Array[] {
const word = (v: number) => [v & 255, (v >>> 8) & 255]
const mode = payload[0] & 127
let calls: Uint8Array[]
if (mode === 8) {
const output: Uint8Array[] = []; let p=2
for(let i=0;i<payload[1];i++) { const n=payload[p] | payload[p+1]<<8; p+=2; output.push(...drawMessages(payload.subarray(p,p+n),width,height));p+=n }
return output
} else if (mode === 3) calls=[new Uint8Array([1,0,0,...payload.subarray(1,5),...payload.subarray(7)])]
else if(mode === 6) calls=[new Uint8Array([1,0,1,0,0,0,0,...word(width),...word(height),...payload.subarray(1)])]
else throw new Error(`Unsupported raster draw ${mode}`)
return calls.map(call => new Uint8Array([26,1,0,...word(call.length),...call]))
}
+1 -1
View File
@@ -26,7 +26,7 @@ export type FirmwareInfo = {
};
/** The Faceclaw firmware revision this build of the app needs. */
export const REQUIRED_FACECLAW_FIRMWARE_VERSION = 23;
export const REQUIRED_FACECLAW_FIRMWARE_VERSION = 25;
const FACECLAW_PREFIX = "Faceclaw/";
const LEGACY_PREFIX = "EVENCFW";
+34 -34
View File
@@ -19,12 +19,12 @@ export type FirmwarePatchSet = {
export const CFW_PATCH_SET: FirmwarePatchSet = {
"base": "g2_2.3.0.24.bin",
"baseSha256": "187ccf2bcc5c17a212106e8a376745511e8289c4232b634a7ea94b9bf25a0979",
"outputSha256": "393ea24203d9a388975c732cae4698339f8af0e13139b73d71386181a1bc004e",
"outputSha256": "986930903c6ea41ad7fd7ed15c73c0a1af00cc9b58604abfe2092a79745bb641",
"patches": [
{
"offset": 1045797,
"old": "38b584b0",
"new": "59f3efbf",
"new": "5cf337be",
"desc": "ring receiver entry: timestamped unfiltered reports under framebuffer lease"
},
{
@@ -36,49 +36,49 @@ export const CFW_PATCH_SET: FirmwarePatchSet = {
{
"offset": 1437923,
"old": "fef788ff",
"new": "faf2fefc",
"new": "fdf246fb",
"desc": "cfw_ancs_event"
},
{
"offset": 1437951,
"old": "fef7e8fb",
"new": "faf238fa",
"new": "fdf280f8",
"desc": "cfw_ancs_open"
},
{
"offset": 1437969,
"old": "fef7e7fb",
"new": "faf24ffa",
"new": "fdf297f8",
"desc": "cfw_ancs_close"
},
{
"offset": 1388387,
"old": "39694d00",
"new": "e5317d00",
"new": "755e7d00",
"desc": "connection-bound ANCS EUS write callback"
},
{
"offset": 971497,
"old": "fff717f8",
"new": "6cf31ff9",
"new": "6ef367ff",
"desc": "bl faceclaw_input_bridge_received (ring relay and ordered private transport before worker pool)"
},
{
"offset": 971845,
"old": "fef769ff",
"new": "6cf371f8",
"new": "6ef3b9fe",
"desc": "bl faceclaw_input_bridge_received (ring relay and ordered private transport before worker pool)"
},
{
"offset": 979579,
"old": "fdf74ef8",
"new": "6af356f9",
"new": "6cf39eff",
"desc": "bl faceclaw_input_bridge_received (ring relay and ordered private transport before worker pool)"
},
{
"offset": 1428895,
"old": "f8f76cfd",
"new": "f9f28afd",
"new": "fcf292f8",
"desc": "bl cfw_receive_packet (private SID-f0 probe before TPL reassembly)"
},
{
@@ -108,145 +108,145 @@ export const CFW_PATCH_SET: FirmwarePatchSet = {
{
"offset": 1248487,
"old": "d4f712fb",
"new": "27f354fb",
"new": "2af3bef8",
"desc": "bl settings_send_wrapper (append caps field 100)"
},
{
"offset": 1246183,
"old": "f5f7e2f8",
"new": "27f374fd",
"new": "2af360fa",
"desc": "bl settings_decode_wrapper (Faceclaw lease field 101)"
},
{
"offset": 975219,
"old": "02f083fc",
"new": "69f3d6fd",
"new": "6cf3c2fa",
"desc": "bl faceclaw_display_start @ 0x467d68 (fail-open wake takeover)"
},
{
"offset": 975411,
"old": "02f023fc",
"new": "69f344fe",
"new": "6cf330fb",
"desc": "bl faceclaw_display_start_headup @ 0x467e28 (fail-open wake takeover)"
},
{
"offset": 975103,
"old": "07f085fb",
"new": "6bf328f9",
"new": "6df370ff",
"desc": "bl headup_gate (head-up sensor event -> EvenHub sys event 12 under lease)"
},
{
"offset": 830549,
"old": "19f03efb",
"new": "8ef3d7fa",
"new": "91f31ff9",
"desc": "bl gesture_ring_press_mode (observe ring touch-down, preserve stock dispatch)"
},
{
"offset": 830795,
"old": "1ff071ff",
"new": "8ef390fa",
"new": "91f3d8f8",
"desc": "bl gesture_press (owned event 9 before stock menu gate)"
},
{
"offset": 830887,
"old": "1ff043ff",
"new": "8ef38afa",
"new": "91f3d2f8",
"desc": "bl gesture_short_long (Faceclaw lease gates event 11 vs stock Menu path)"
},
{
"offset": 831763,
"old": "1ff08dfd",
"new": "8ef3c0f8",
"new": "90f308ff",
"desc": "bl gesture_release (owned event 10 before stock menu gate)"
},
{
"offset": 1570209,
"old": "7fb50600",
"new": "d8f2e5be",
"new": "dbf24fbc",
"desc": "even_ai_display_ctrl entry -> conditional Faceclaw lease trampoline"
},
{
"offset": 1051545,
"old": "f6f787f9",
"new": "53f3cbfc",
"new": "55f3fbfb",
"desc": "bl display_copy_hook @ 0x47a78e (640x480 direct framebuffer)"
},
{
"offset": 1051861,
"old": "f6f7e9f8",
"new": "53f32dfc",
"new": "55f35dfb",
"desc": "bl display_copy_hook @ 0x47a8ca (640x480 direct framebuffer)"
},
{
"offset": 1262237,
"old": "d9f7d0fd",
"new": "23f3b3fc",
"new": "26f333f9",
"desc": "bl faceclaw_send_wear_event @ 0x4ade92 (outside onboarding)"
},
{
"offset": 1262337,
"old": "d9f79efd",
"new": "23f381fc",
"new": "26f301f9",
"desc": "bl faceclaw_send_wear_event @ 0x4adef6 (outside onboarding)"
},
{
"offset": 1309405,
"old": "67f02dff",
"new": "17f39bfd",
"new": "1af319fa",
"desc": "bl compass_decode_capture (sample-matched GAF diagnostics)"
},
{
"offset": 1307865,
"old": "fff7c9fb",
"new": "18f319f9",
"new": "1af397fd",
"desc": "bl compass_report_event (stock UI + heading with diagnostics over BLE)"
},
{
"offset": 1300937,
"old": "00210170",
"new": "19f3fffd",
"new": "1cf37dfa",
"desc": "bl compass_preserve_accuracy (retain magnetic calibration under Faceclaw framebuffer lease)"
},
{
"offset": 4537963,
"old": "",
"new": "b0b581ea00039b0701d0034637e0c2b110f0030315d000f1010ca2f1010e0023cc5c9e45c45403f1010404d0634413f003032346f4d121440319121b102a14d302e00346102a10d3d1f800c0d1f804e0cc688d68103adc609d60c3f804e043f810cb0f2a01f11001eed8042a07d300bf51f8045b043a032a43f8045bf8d8002a08bfb0bd0139013b11f8015f013a03f8015ff9d1b0bd00bf884218bf002a00d1704710b50b1a38bf431a934207d288420ad281ea00039b0726d0034669e0fff79fffbde81040704781ea000300eb020c9b0701eb020e42d15fea8c732bd0a0f1010c00bf8b1813f801ec8418531e04f801ec04d0624412f003021a46f2d101eb030e00eb030c17e0830736d0a2f1010c00f1010e002300bfcc5c9c45c45403f1010404d0734413f003032346f4d1121b2144031922e01346042b0ed3aef10402acf1040152f80449043b032b41f80449f8d802f1040e01f1040c1a4653b1aef10101acf1010300bf11f80149013a03f80149f9d1bde8104070470346042a06d351f8044b043a032a43f8044bf8d8002af0d00139013b00bf11f8014f013a03f8014ff9d1e6e700bf2de9f04fa5b04ef66c6a4ff29c5516460c46ccf2ff0ac2f229054ff6ff7800274ff00109019006e048f2a351c0f24501bff32f8f8847d5f800b0bff35f8f28680321cff680710140b1f1005fbff35f8f02d10168514543d04ff4417004f050fb002800f036810021421847540431b1f5417f57709770d770f6d1c0f800a080f80a90a0f81c80a0f81e80a0f82080a0f82280a0f82480a0f82680a0f82880a0f82a80a0f82c80a0f82e80a0f83080a0f83280a0f83480a0f83680a0f83880a0f83a8055e8001f5945aed1bff35f8f00bf45e8000121b155e8001f5945f8d0a3e7a34644ea064100260127c0f8701206e048f2a351c0f24501bff32f8f88472c68bff35f8f28680321cff680710140b1f1005fbff35f8f02d10168514542d04ff4417004f0edfa002800f0d380002100bf421846540431b1f5417f56709670d670f6d1c0f800a08772a0f81c80a0f81e80a0f82080a0f82280a0f82480a0f82680a0f82880a0f82a80a0f82c80a0f82e80a0f83080a0f83280a0f83480a0f83680a0f83880a0f83a8055e8001fa142afd1bff35f8f45e8000121b155e8001fa142f8d0a5e7d0f8746242f6f767c0f24407002ebff35f8f71d007f19a0230464ff0ff314ff0ff379047002840f0c28047f6df40c0f24f00804700274ff001090397adf8107007e000bf48f2a351c0f24501bff32f8f88472c68bff35f8f28680321cff680710140b1f1005fbff35f8f02d10168514567d04ff4417004f071fa002860d00021421847540431b1f5417f57709770d770f6d1c0f800a080f80a90a0f81c80a0f81e80a0f82080a0f82280a0f82480a0f82680a0f82880a0f82a80a0f82c80a0f82e80a0f83080a0f83280a0f83480a0f83680a0f83880a0f83a8055e8001fa142b0d1bff35f8f00bf45e8000149b355e8001fa142f8d0a5e704460020b847b0b104f51d7151e8006f4eb9bff35f8f00bf41e8000292b151e8006f002ef8d00021bff32f8fbff35f8f21b1064672e74ff0ff373ce007f5a97188476be70121f1e70020019f42f6f769002f4ff00104c0f2440918bfbbf1000f2dd102ad8046284602f054f903ab38465946012205f0eefc9df8111007462846002918bf4ff0ff3702f0f6f9002c044608d19df8100028b94af21f30c0f247004c308047b8f1000f18bfc8f80c4009f5807130468847384625b0bde8f08f3a7802f07f01a1f1150313f1030f0bd802f07b030b2b07d002f07e02082a03d0032901d00629bdd140b14af21f31c0f247010446884794f8641111b14ff0ff37d6e720460024ade700bf2de9f0474ef66c6a4ff29c5548f2a359ccf2ff0ac2f229054ff6ff7600274ff00108c0f2450902e0bff32f8fc8472c68bff35f8f2868bff35f8f01466ff39601b1f1005f02d10168514535d04ff4417004f084f978b30021421847540431b1f5417f57709770d770f6d1c0f800a080f80a808683c683068446848684c684068546858685c685068646868686c6860687468755e8001fa142c6d1bff35f8f00bf45e80001002908bfbde8f08755e8001fa142f5d0b8e70020bde8f08770b500284dd001684ef66c62ccf2ff02914218bf70bd90f8441090f845504bf6394c8d42c0f2510c2ad205eb8501014491f8492091f84a4091f846e091f8473091f8481042ea0424012c4ff0010298bf14466e1c054680f84560b9b164294eea032028bf6421012888bf024644f62060824228bf02460cf5e2731046984706e0002180f84410bde870406047e047286c38b142f64d42c0f244022146bde87040104770bd02464ff64b70cff6ff7042f6653c7844c0f2440c00210023604700bf2de9f04f9db04ff29c50c2f22900d0f800b0bff35f8f58466ff39600b0f1005f3fd1dbf800004ef66c65ccf2ff05a84237d19bf8640110b3dbf86041fcb140f24030c2f20000d0f8787502a802f020f8002f00f0f18040f20308384621464ff41632cff680784ff6ff760197fff764fc48f2a35900240127c0f245091ce09bf8660170b1dbf8680140b147f64c61c2f207010968401a002801f3cc8700208bf8660140f6a120c0f247001db0bde8f04f0047bff32f8fc8474ff29c50c2f22900d0f800a0bff35f8f0068bff35f8f00ea0801b1f1005f02d10168a94236d04ff4417004f07df8002801f08c87002100bf421844540431b1f5417f54709470d470f6d14ff29c52056087728683c683068446848684c684068546858685c685068646868686c68606874687c2f2290252e8001f5145bdd1bff35f8f00bf42e8000121b152e8001f5145f8d0b2e7817a002941f05887027e0021002a8df814107cd04ff29c5605aac2f22906535c002b00f0b68053185f78002f74d09f78002f73d0df78002f72d01f79002f71d05f79002f70d09f79002f6fd0df79002f6ed01f7a002f6dd05f7a002f6cd09f7a002f6bd0df7a002f6ad01f7b002f69d05f7b002f68d09f7b002f67d0df7b002f66d01f7c002f65d05f7c002f64d09f7c002f63d0df7c002f62d01f7d002f61d05f7d002f60d09f7d002f5fd0df7d002f5ed01f7e002f5dd05f7e002f5cd09f7e002f5bd0df7e002f5ad01f7f002f59d05f7f002f58d09f7f002f57d0db7f002b56d0203160297ff49aaf76e000208bf86401cbf860018bf8660101208bf8650140f6a120c0f24700804701f0e8be4ff29c56c2f2290664e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2921d84ff0520353541dd00a4445235e29537018d04Line truncated
"new": "b0b581ea00039b0701d0034637e0c2b110f0030315d000f1010ca2f1010e0023cc5c9e45c45403f1010404d0634413f003032346f4d121440319121b102a14d302e00346102a10d3d1f800c0d1f804e0cc688d68103adc609d60c3f804e043f810cb0f2a01f11001eed8042a07d300bf51f8045b043a032a43f8045bf8d8002a08bfb0bd0139013b11f8015f013a03f8015ff9d1b0bd00bf884218bf002a00d1704710b50b1a38bf431a934207d288420ad281ea00039b0726d0034669e0fff79fffbde81040704781ea000300eb020c9b0701eb020e42d15fea8c732bd0a0f1010c00bf8b1813f801ec8418531e04f801ec04d0624412f003021a46f2d101eb030e00eb030c17e0830736d0a2f1010c00f1010e002300bfcc5c9c45c45403f1010404d0734413f003032346f4d1121b2144031922e01346042b0ed3aef10402acf1040152f80449043b032b41f80449f8d802f1040e01f1040c1a4653b1aef10101acf1010300bf11f80149013a03f80149f9d1bde8104070470346042a06d351f8044b043a032a43f8044bf8d8002af0d00139013b00bf11f8014f013a03f8014ff9d1e6e700bf2de9f04fc5b04ff690454ef66c6b4ff29c591446cff6ff75ccf2ff0bc2f229094ff6ff78002701260d93cde90e0106e048f2a351c0f24501bff32f8f8847d9f800a0bff35f8fd9f800000321cff680710140b1f1005fbff35f8f03d10168594500f0ac804ff45c7007f0b4f8002800f0eb8129464218373182f8707382f8717382f8727382f8737382f8747382f8757382f8767382f8777382f8787382f8797382f87a7382f87b7382f87c7382f87d7382f87e7382f87f7382f8807382f8817382f8827382f8837382f8847382f8857382f8867382f8877382f8887382f8897382f88a7382f88b7382f88c7382f88d7382f88e7382f88f7382f8907382f8917382f8927382f8937382f8947382f8957382f8967382f8977382f8987382f8997382f89a7382f89b7382f89c7382f89d7382f89e7382f89f7382f8a07382f8a17382f8a27382f8a37382f8a47382f8a57382f8a6738ed1c0f800b08672a0f81c80a0f81e80a0f82080a0f82280a0f82480a0f82680a0f82880a0f82a80a0f82c80a0f82e80a0f83080a0f83280a0f83480a0f83680a0f83880a0f83a8059e8001f51457ff445afbff35f8f00bf49e8000121b159e8001f5145f8d039e70f99012641ea04410024c0f8701206e048f2a351c0f24501bff32f8f8847d9f80070bff35f8fd9f800000321cff680710140b1f1005fbff35f8f03d10168594500f0ac804ff45c7006f0e6ff002800f01d8129464218373182f8704382f8714382f8724382f8734382f8744382f8754382f8764382f8774382f8784382f8794382f87a4382f87b4382f87c4382f87d4382f87e4382f87f4382f8804382f8814382f8824382f8834382f8844382f8854382f8864382f8874382f8884382f8894382f88a4382f88b4382f88c4382f88d4382f88e4382f88f4382f8904382f8914382f8924382f8934382f8944382f8954382f8964382f8974382f8984382f8994382f89a4382f89b4382f89c4382f89d4382f89e4382f89f4382f8a04382f8a14382f8a24382f8a34382f8a44382f8a54382f8a6438ed1c0f800b08672a0f81c80a0f81e80a0f82080a0f82280a0f82480a0f82680a0f82880a0f82a80a0f82c80a0f82e80a0f83080a0f83280a0f83480a0f83680a0f83880a0f83a8059e8001fb9427ff445afbff35f8f00bf49e8000121b159e8001fb942f8d039e7d0f874a242f6f766c0f24406baf1000fbff35f8f4ad006f19a0250464ff0ff314ff0ff379047002840f08f810f98002861d00e980778a7f1170002285bd80f980c2840f078810e9e7078b178084300f07281f0780138022800f26d81b279f379747a42ea0322337a307942ea0342717942ea0463b27af67a192f42ea062200f07f83172f40f09583002a40f05481fe2800f0cb87812800f0bd87002840f0d28751ea030040f0478101f062b904460020b047e8b104f51d7151e800afbaf1000f0cd1bff35f8f00bf41e80002002a00f0e78051e800afbaf1000ff5d00021bff32f8f0029bff35f8f00f0d680824692e74ff0ff3729e147f6df40c0f24f008047002701261197adf8487006e048f2a351c0f24501bff32f8f8847d9f80040bff35f8fd9f800000321cff680710140b1f1005fbff35f8f03d10168594500f0b3804ff45c7006f09afe002800f0ab8029464218373182f8707382f8717382f8727382f8737382f8747382f8757382f8767382f8777382f8787382f8797382f87a7382f87b7382f87c7382f87d7382f87e7382f87f7382f8807382f8817382f8827382f8837382f8847382f8857382f8867382f8877382f8887382f8897382f88a7382f88b7382f88c7382f88d7382f88e7382f88f7382f8907382f8917382f8927382f8937382f8947382f8957382f8967382f8977382f8987382f8997382f89a7382f89b7382f89c7382f89d7382f89e7382f89f7382f8a07382f8a17382f8a27382f8a37382f8a47382f8a57382f8a6738ed1c0f800b08672a0f81c80a0f81e80a0f82080a0f82280a0f82480a0f82680a0f82880a0f82a80a0f82c80a0f82e80a0f83080a0f83280a0f83480a0f83680a0f83880a0f83a8059e8001fa1427ff445afbff35f8f00bf49e8000159b159e8001fa142f8d039e706f5a9718847bae601211ee700200e9999b10f9a8ab1097801f07f02b2f10b0418bf0124b2f11c0618bf01268a2924dc0b2926d01c2924d03fe00d9010a804f0e1f94ff0ff3701269df84900002810a818bf4ff0ff3704f0fffa054646b99df8480028b94af21f30c0f247004c3080470d98002818bfc56013e09c2901d08b291bd160b14af21f31c0f247010746884797f8641119b997f80413384669b14ff0ff3742f6f760c0f2440000f5807150468847384645b0bde8f08f0d9010a8264004f0a0f90e98007800f07f040f2c2ddd142c40f3a981152c00f01183162c00f01c831d2c40f0da830f9801380228c0f04f850e994878897840ea0124b4f5007f00f2468504eb4400032101eb40000f99884240f03d8505f02ffe002800f038850c96002601270f9400f055bd092c00f3d180052c00f00c82072c40f0af83002706e048f2a351c0f24501bff32f8f8847d9f80040bff35f8fd9f800000321cff680710140b1f1005fbff35f8f03d10168594500f085864ff45c7006f033fd002800f07d86294600bf4218373182f8707382f8717382f8727382f8737382f8747382f8757382f8767382f8777382f8787382f8797382f87a7382f87b7382f87c7382f87d7382f87e7382f87f7382f8807382f8817382f8827382f8837382f8847382f8857382f8867382f8877382f8887382f8897382f88a7382f88b7382f88c7382f88d7382f88e7382f88f7382f8907382f8917382f8927382f8937382f8947382f895738Line truncated
"desc": "append injected blobs to main-app payload"
},
{
"offset": 779123,
"old": "805a3900",
"new": "f00a3a00",
"new": "04403a00",
"desc": "main-app subheader payload size (ps)"
},
{
"offset": 152,
"old": "005b3900",
"new": "700b3a00",
"new": "84403a00",
"desc": "main-app TOC entry size (ps + 128)"
},
{
"offset": 779243,
"old": "805a3904",
"new": "f00a3a04",
"new": "04403a04",
"desc": "main-app preamble length (low 24 bits)"
},
{
"offset": 779247,
"old": "effdbcea",
"new": "09a9afac",
"new": "4c01635d",
"desc": "[5] ota/s200_firmware_ota.bin preamble crc32"
},
{
"offset": 156,
"old": "c0c6322a",
"new": "19292813",
"new": "155cd97f",
"desc": "[5] ota/s200_firmware_ota.bin component crc32c (TOC)"
},
{
"offset": 779127,
"old": "c0c6322a",
"new": "19292813",
"new": "155cd97f",
"desc": "[5] ota/s200_firmware_ota.bin component crc32c (subheader)"
}
]
+6 -4
View File
@@ -1,3 +1,4 @@
import { drawMessages } from './draw-protocol'
import { setBrightness } from './brightness-protocol'
import { AncsClient, ANCS_FIRMWARE_VERSION } from './ancs-client'
import { type CompassEvent } from '../native/compass-types'
@@ -254,7 +255,7 @@ export class GlassesSession {
return Promise.all(['right', 'left'].map(role => this.send(role, protocol.SID.settings, 0x20, protocol.framebufferLease(acquire))))
}
private requestCfw(role: string, payload: Uint8Array): Promise<void> {
if (payload.length > CFW_MAX_MESSAGE) return Promise.reject(new Error('CFW message too large'))
if (payload.length > CFW_MAX_MESSAGE - 16) return Promise.reject(new Error('CFW message too large'))
return new Promise((resolve, reject) => {
const item: CfwPending = { role, payload, checksum: protocol.crc16(payload), magic: this.nextMagic(), ackLenses: 0, retries: 0,
retryPending: false, deadline: 0, resolve, reject }
@@ -508,7 +509,7 @@ export class GlassesSession {
const textureFrame = this.latestTextures; this.latestTextures = null
// Compare with the last enqueued image, not the last ACKed one. In an
// A -> B -> A sequence, B may still be in flight when A is requested.
if (this.lastEnqueued && packed.every((value, i) => value === this.lastEnqueued![i])) continue
if (!textureFrame && this.lastEnqueued && packed.every((value, i) => value === this.lastEnqueued![i])) continue
const texturePlan = textureFrame ? this.textures?.plan(this.lastEnqueued, packed, textureFrame, this.nextImageFrameId) : null
let commands: Uint8Array[]
if (texturePlan) {
@@ -521,9 +522,10 @@ export class GlassesSession {
const delta = buildBoundingBoxPayload(this.lastEnqueued, packed, 640, 480, this.nextImageFrameId)
const payload = delta ?? protocol.concat(new Uint8Array([6]), protocol.rle4(packed))
if (delta) this.nextImageFrameId = this.nextImageFrameId >= 0xfffe ? 1 : this.nextImageFrameId + 1
commands = payload.length <= CFW_MAX_MESSAGE ? [payload] : buildFullFrameBands(packed, 640, 480, this.nextImageFrameId)
if (payload.length > CFW_MAX_MESSAGE) for (const _ of commands)
commands = payload.length <= CFW_MAX_MESSAGE - 16 ? [payload] : buildFullFrameBands(packed, 640, 480, this.nextImageFrameId)
if (payload.length > CFW_MAX_MESSAGE - 16) for (const _ of commands)
this.nextImageFrameId = this.nextImageFrameId >= 0xfffe ? 1 : this.nextImageFrameId + 1
commands = [...commands.flatMap(command => drawMessages(command)), new Uint8Array([28])]
this.log(`Display ${delta ? 'bbox' : 'full'} (${commands.length} CFW commands)`)
}
this.displaySending = { packed, commands, offset: 0, pending: 0 }
+1 -3
View File
@@ -352,9 +352,7 @@ export class IosPreviewController {
try {
if (this.shellDirty) {
this.shellDirty = false
const { image, draws } = flattenPlanesWithDraws(shell.paintSurface(), { width: 640, height: 480 })
this.compositor.submitSurfaceFrame('shell', image.pixels, { x: 0, y: 0, width: 640, height: 480 }, prepareFrameDraws(draws))
this.compositor.setUnderlayDim(1, shell.underlayDim())
this.compositor.setShellScene(shell.paintScene())
}
const { pixels, textures } = this.compositor.compositeFrame()
this.session?.setFrame(pixels, textures)