{"ScriptPreparationCode":"const COUNT = 100\r\n\r\nconst offscreens = new Array(COUNT)\r\nfor (let i=0; i\u003CCOUNT; i\u002B\u002B) {\r\n const canvas = document.createElement(\u0027canvas\u0027)\r\n const ctx = canvas.getContext(\u00272d\u0027)\r\n ctx.fillStyle = \u0022red\u0022\r\n ctx.fillRect(0, 0, 100, 50)\r\n offscreens[i] = ctx\r\n}\r\n\r\nconst path2ds = new Array(COUNT)\r\nfor (let i=0; i\u003CCOUNT; i\u002B\u002B) {\r\n const path2d = new Path2D()\r\n path2d.rect(0, 0, 100, 50)\r\n path2ds[i] = path2d\r\n}\r\n\r\nconst canvas = document.getElementById(\u0027test-canvas\u0027)\r\nconst ctx = canvas.getContext(\u00272d\u0027)","TestCases":[{"Name":"Create instances of offscreen canvas","Code":"const results = new Array(COUNT)\r\nfor (let i=0; i\u003CCOUNT; i\u002B\u002B) {\r\n const canvas = document.createElement(\u0027canvas\u0027)\r\n canvas.width = 100\r\n canvas.height = 50\r\n const ctx = canvas.getContext(\u00272d\u0027)\r\n ctx.fillStyle = \u0022red\u0022\r\n ctx.fillRect(0, 0, 100, 50)\r\n results[i] = ctx\r\n}","IsDeferred":false},{"Name":"Create instances of Path2D","Code":"const results = new Array(COUNT)\r\nfor (let i=0; i\u003CCOUNT; i\u002B\u002B) {\r\n const path2d = new Path2D()\r\n path2d.rect(0, 0, 100, 50)\r\n results[i] = path2d\r\n}","IsDeferred":false},{"Name":"Render offscreen canvases","Code":"for (let i=0; i\u003CCOUNT; i\u002B\u002B) {\r\n ctx.drawImage(offscreens[i].canvas, 0, 0, 100, 50)\r\n}","IsDeferred":false},{"Name":"Render Path2D","Code":"for (let i=0; i\u003CCOUNT; i\u002B\u002B) {\r\n ctx.fillStyle = \u0022red\u0022\r\n ctx.fill(path2ds[i])\r\n}","IsDeferred":false}]}