2019-03-06 14:30:44 +00:00
|
|
|
// The increased timeout is especially needed with larger binaries
|
|
|
|
// like in the debug/gpu build
|
|
|
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000;
|
|
|
|
|
|
|
|
let CanvasKit = null;
|
2020-04-03 19:11:42 +00:00
|
|
|
const LoadCanvasKit = new Promise((resolve, reject) => {
|
2019-03-07 16:31:08 +00:00
|
|
|
console.log('canvaskit loading', new Date());
|
2019-03-06 14:30:44 +00:00
|
|
|
CanvasKitInit({
|
|
|
|
locateFile: (file) => '/canvaskit/'+file,
|
2020-05-21 13:59:44 +00:00
|
|
|
}).then((loaded) => {
|
2019-03-07 13:43:11 +00:00
|
|
|
console.log('canvaskit loaded', new Date());
|
2019-03-06 14:30:44 +00:00
|
|
|
CanvasKit = loaded;
|
|
|
|
resolve();
|
2019-03-07 13:43:11 +00:00
|
|
|
}).catch((e) => {
|
|
|
|
console.error('canvaskit failed to load', new Date(), e);
|
|
|
|
reject();
|
2019-03-06 14:30:44 +00:00
|
|
|
});
|
2020-05-21 13:59:44 +00:00
|
|
|
});
|