MCPcopy Create free account
hub / github.com/microsoft/SandDance / _parseToImageBitmap

Function _parseToImageBitmap

docs/tests/v3/es6/js/sanddance-test-es6.js:5609–5641  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5607}
5608exports.default = parseToImageBitmap;
5609function _parseToImageBitmap() {
5610 _parseToImageBitmap = (0, _asyncToGeneratorDefault.default)((0, _regeneratorDefault.default).mark(function _callee(arrayBuffer, options, url) {
5611 var blob, image, imagebitmapOptions;
5612 return (0, _regeneratorDefault.default).wrap(function _callee$(_context) {
5613 while(true)switch(_context.prev = _context.next){
5614 case 0:
5615 if (!(0, _svgUtils.isSVG)(url)) {
5616 _context.next = 7;
5617 break;
5618 }
5619 _context.next = 3;
5620 return (0, _parseToImageDefault.default)(arrayBuffer, options, url);
5621 case 3:
5622 image = _context.sent;
5623 blob = image;
5624 _context.next = 8;
5625 break;
5626 case 7:
5627 blob = (0, _svgUtils.getBlob)(arrayBuffer, url);
5628 case 8:
5629 imagebitmapOptions = options && options.imagebitmap;
5630 _context.next = 11;
5631 return safeCreateImageBitmap(blob, imagebitmapOptions);
5632 case 11:
5633 return _context.abrupt("return", _context.sent);
5634 case 12:
5635 case "end":
5636 return _context.stop();
5637 }
5638 }, _callee);
5639 }));
5640 return _parseToImageBitmap.apply(this, arguments);
5641}
5642function safeCreateImageBitmap(_x4) {
5643 return _safeCreateImageBitmap.apply(this, arguments);
5644}

Callers

nothing calls this directly

Calls 1

safeCreateImageBitmapFunction · 0.70

Tested by

no test coverage detected