| 190 | } |
| 191 | |
| 192 | function toAppConfig(config: NodeAppConfig | undefined): AppConfig | undefined { |
| 193 | if (config === undefined) return undefined; |
| 194 | return { |
| 195 | ...(config.fpsCap !== undefined ? { fpsCap: config.fpsCap } : {}), |
| 196 | ...(config.maxEventBytes !== undefined ? { maxEventBytes: config.maxEventBytes } : {}), |
| 197 | ...(config.maxDrawlistBytes !== undefined ? { maxDrawlistBytes: config.maxDrawlistBytes } : {}), |
| 198 | ...(config.drawlistValidateParams !== undefined |
| 199 | ? { drawlistValidateParams: config.drawlistValidateParams } |
| 200 | : {}), |
| 201 | ...(config.drawlistReuseOutputBuffer !== undefined |
| 202 | ? { drawlistReuseOutputBuffer: config.drawlistReuseOutputBuffer } |
| 203 | : {}), |
| 204 | ...(config.drawlistEncodedStringCacheCap !== undefined |
| 205 | ? { drawlistEncodedStringCacheCap: config.drawlistEncodedStringCacheCap } |
| 206 | : {}), |
| 207 | ...(config.maxFramesInFlight !== undefined |
| 208 | ? { maxFramesInFlight: config.maxFramesInFlight } |
| 209 | : {}), |
| 210 | ...(config.internal_onRender !== undefined |
| 211 | ? { internal_onRender: config.internal_onRender } |
| 212 | : {}), |
| 213 | ...(config.internal_onLayout !== undefined |
| 214 | ? { internal_onLayout: config.internal_onLayout } |
| 215 | : {}), |
| 216 | }; |
| 217 | } |
| 218 | |
| 219 | function toBackendConfig(config: NodeAppConfig | undefined): NodeBackendConfig { |
| 220 | if (config === undefined) return {}; |