forked from Blendman974/faceclaw
Optimize phone CPU usage
This commit is contained in:
1 parent
449cb0bf73
commit
45d2ece0d2
19 files changed
+485
-103
No files matched your search
@@ -18,6 +18,7 @@ export type DisplayTarget = Pick<
|
||||
| "setUnderlayDim"
|
||||
| "setScreenBlanked"
|
||||
| "submitSurfaceFrame"
|
||||
| "isSurfaceCurrent"
|
||||
| "submitShellScene"
|
||||
| "waitForFrameFinished"
|
||||
| "getCompositePreview"
|
||||
@@ -109,6 +110,11 @@ export class PreviewDisplayTarget implements DisplayTarget {
|
||||
this.composited();
|
||||
}
|
||||
|
||||
/** Never skips: preview frames are cheap and nothing is transmitted. */
|
||||
isSurfaceCurrent(_surfaceId: string, _fingerprint: string): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
async submitShellScene(bytes: Uint8Array, _paintMs = 0, _frameId = 0): Promise<void> {
|
||||
this.compositor.setShellScene(bytes);
|
||||
this.composited();
|
||||
|
||||
Reference in new issue
Block a user