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

Side by Side Diff: third_party/WebKit/ManualTests/canvas-stretch-color-bleeding.html

Issue 2438313002: Fixing color bleeding when the canvas is stretched. (Closed)
Patch Set: Addressing comments. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <head>
3 <style>
4 body {
5 background: black;
6 }
7 </style>
8 <body>
9 This test checks if the color bleeds due to interpolation filter when the canvas is stretched. We expect to see a white band extending from left to right withou t any vertical black lines.
10 <canvas id='foo' width='100' height='100' style='width:500px;height:100px'> </ca nvas>
11 <script>
12
13 if (window.testRunner) {
14 testRunner.waitUntilDone();
15 }
16
17 var i = 0;
18 var ctx = document.getElementById("foo").getContext("2d");
19 ctx.fillStyle = 'white';
20
21 function draw_slice() {
22 if (i >= 100) {
23 if (window.testRunner) {
24 testRunner.notifyDone();
25 }
26 }
27 ctx.fillRect(i, 0, 2, 100);
28 i+=2;
29 window.requestAnimationFrame(draw_slice);
30 }
31
32 draw_slice();
33 </script>
34 </body>
35 </head>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698