Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/spv2/canvas-putImageData-expected.html

Issue 2010243002: Remove paint/invalidation/spv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!-- Test for https://bugs.webkit.org/show_bug.cgi?id=46319 -->
2 <head>
3 </head>
4 <body>
5 <canvas id="canvas" width="100" height="100"></canvas>
6 <script>
7 var canvas = document.getElementById('canvas');
8 var ctx = canvas.getContext('2d');
9
10 // prepare imagedata
11 ctx.fillStyle = "rgb(255, 0, 0)"; ctx.fillRect(0, 0, 100, 100); // red b ackground
12 ctx.fillStyle = "rgb(0, 255, 0)"; ctx.fillRect(10, 10, 10, 10); // inset green square
13 var imageDataGreen = ctx.getImageData(10, 10, 10, 10);
14 var imageDataRedWithInsetGreen = ctx.getImageData(0, 0, 30, 30);
15
16 // clear canvas to dark green
17 ctx.fillStyle = "rgb(0, 128, 0)";
18 ctx.fillRect(0, 0, 100, 100);
19
20 // fill target locations with dark red
21 ctx.fillStyle = "rgb(128, 0, 0)";
22 ctx.fillRect(0, 0, 10, 10);
23 ctx.fillRect(40, 40, 10, 10);
24 ctx.fillRect(80, 80, 10, 10);
25
26 // patch up red squares with putImageData
27 ctx.putImageData(imageDataGreen, 0, 0);
28 ctx.putImageData(imageDataGreen, 40, 40);
29 ctx.putImageData(imageDataRedWithInsetGreen, 70, 70, 10, 10, 10, 10);
30 </script>
31 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698