{"ScriptPreparationCode":"$canvas = document.getElementById(\u0027canvas\u0027);\r\n$context = $canvas.getContext(\u00272d\u0027);\r\n$context.clearRect(0, 0, 800, 300);\r\n\r\n$iterations = 500;","TestCases":[{"Name":"Not saving and restoring context state","Code":"for (let i=0; i\u003C$iterations; \u002B\u002Bi) {\r\n $context.fillStyle = \u0027rgba(100,150,200,0.9)\u0027;\r\n $context.fillRect(0, 0, 1, 1);\r\n}","IsDeferred":false},{"Name":"Saving and restoring context state","Code":"for (let i=0; i\u003C$iterations; \u002B\u002Bi) {\r\n $context.save();\r\n $context.fillStyle = \u0027rgba(100,150,200,0.9)\u0027;\r\n $context.fillRect(0, 0, 1, 1);\r\n $context.restore();\r\n}","IsDeferred":false}]}