forked from Blendman974/faceclaw
Add a resource-usage monitor to debug app; fix excessive memory-usage from screen preview when not focused
This commit is contained in:
1 parent
b5213170e3
commit
9ade3503a0
6 files changed
+331
-7
No files matched your search
@@ -2,6 +2,7 @@ import { MenuLayer } from "../../ui/menu";
|
||||
import { ScreenTestLayer } from "./screen-test";
|
||||
import { BuzzerDemoLayer } from "./buzzer-demo";
|
||||
import { AccelerometerDemoLayer } from "./accelerometer-demo";
|
||||
import { ResourceUsageLayer } from "./resource-usage";
|
||||
import { appViewportSize } from "../../ui/shell/geometry";
|
||||
import {
|
||||
createInProcessWindow,
|
||||
@@ -19,7 +20,7 @@ export function createDebugTestsAppWindow(options: InProcessAppOptions): InProce
|
||||
"Debug tests",
|
||||
[
|
||||
{
|
||||
label: "Screen test",
|
||||
label: "Dither test",
|
||||
onSelect: (ctx) => {
|
||||
ctx.stack.push(new ScreenTestLayer());
|
||||
},
|
||||
@@ -36,11 +37,18 @@ export function createDebugTestsAppWindow(options: InProcessAppOptions): InProce
|
||||
ctx.stack.push(new AccelerometerDemoLayer(DEBUG_TESTS_WINDOW_ID, ctx.actions.requestRender));
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Show resource usage",
|
||||
onSelect: (ctx) => {
|
||||
ctx.stack.push(new ResourceUsageLayer(DEBUG_TESTS_WINDOW_ID, ctx.actions.requestRender));
|
||||
},
|
||||
},
|
||||
],
|
||||
{
|
||||
x: 8,
|
||||
y: 8,
|
||||
width: 272,
|
||||
showBorder: false,
|
||||
minHeight: 0,
|
||||
maxHeight: appViewportSize("min").height - 16,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user