{"ScriptPreparationCode":"var canvas = document.getElementById(\u0027master\u0027);\r\nvar ctx = canvas.getContext(\u00272d\u0027);\r\nvar pid = document.getElementById(\u0027pid\u0027).getContext(\u00272d\u0027);\r\nvar pid2 = document.getElementById(\u0027pid2\u0027).getContext(\u00272d\u0027);\r\nvar imgData;\r\nvar width = 1000;\r\nvar height = 1000;\r\nctx.width = width;\r\nctx.height = height;\r\nctx.fillStyle = \u0022red\u0022;\r\n\r\n// DRAW SOME BLOCKS\r\nfor (let i=0; i\u003Cwidth; i\u002B=50) {\r\n ctx.fillRect(i,0,50,50);\r\n ctx.fillRect(i,(height/2)-25,50,50);\r\n ctx.fillRect(i,height-50,50,50);\r\n}\r\nfor (let i=0; i\u003Cheight; i\u002B=50) {\r\n ctx.fillRect(0,i,50,50);\r\n ctx.fillRect((width/2)-25,i,50,50);\r\n ctx.fillRect(width-50,i,50,50);\r\n}\r\n\r\n// PRE-COPY IMG DATA\r\nimgData = ctx.getImageData(0,0,width,height);\r\n","TestCases":[{"Name":"DrawImage copy canvas -\u003E canvas","Code":"pid.drawImage(canvas,0,0);","IsDeferred":false},{"Name":"PutImageData copy imgData -\u003E canvas","Code":"pid2.putImageData(imgData,0,0);","IsDeferred":false},{"Name":"PutImageData copy canvas -\u003E imgData -\u003E canvas","Code":"let imgDataLocal = ctx.getImageData(0,0,width,height);\r\npid2.putImageData(imgDataLocal,0,0);","IsDeferred":false}]}