forked from Blendman974/faceclaw
Use the texture cache to avoid resending icons and font glyphs
This commit is contained in:
1 parent
221dbb77ea
commit
83e0fa919f
26 files changed
+1724
-113
No files matched your search
@@ -515,6 +515,12 @@ export class FaceclawCommunicatorBridge {
|
||||
fingerprint: string,
|
||||
paintMs = -1,
|
||||
frameId = 0,
|
||||
/**
|
||||
* The frame's glyph draws in surface coordinates (see
|
||||
* graphics/glyph-wire.ts prepareFrameGlyphs); lets the texture-cache
|
||||
* pipeline ship text as on-glasses cached draws instead of pixels.
|
||||
*/
|
||||
glyphs: ArrayBuffer | null = null,
|
||||
): Promise<void> {
|
||||
// Snapshot because the Java call is deferred; the buffer is passed as an
|
||||
// ArrayBuffer, which NativeScript marshals to a ByteBuffer without the
|
||||
@@ -531,6 +537,7 @@ export class FaceclawCommunicatorBridge {
|
||||
fingerprint,
|
||||
Math.round(nonNegativeNumber(paintMs)),
|
||||
Math.round(nonNegativeNumber(frameId)),
|
||||
glyphs,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export function grayImageToPreviewSource(image: GrayImage): ImageSource | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
const baked = image.withGlyphsBaked();
|
||||
const baked = image.withDrawsBaked();
|
||||
const bitmap = com.faceclaw.app.PreviewBitmapUtil.fromGray(
|
||||
baked.pixels.buffer,
|
||||
baked.width,
|
||||
|
||||
Reference in new issue
Block a user