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

Unified 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, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/ManualTests/canvas-stretch-color-bleeding.html
diff --git a/third_party/WebKit/ManualTests/canvas-stretch-color-bleeding.html b/third_party/WebKit/ManualTests/canvas-stretch-color-bleeding.html
new file mode 100644
index 0000000000000000000000000000000000000000..e77ca7d400e993b5b2fec5385f40660d58a9fe34
--- /dev/null
+++ b/third_party/WebKit/ManualTests/canvas-stretch-color-bleeding.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<head>
+<style>
+body {
+ background: black;
+ }
+</style>
+<body>
+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 without any vertical black lines.
+<canvas id='foo' width='100' height='100' style='width:500px;height:100px'> </canvas>
+<script>
+
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+}
+
+var i = 0;
+var ctx = document.getElementById("foo").getContext("2d");
+ctx.fillStyle = 'white';
+
+function draw_slice() {
+ if (i >= 100) {
+ if (window.testRunner) {
+ testRunner.notifyDone();
+ }
+ }
+ ctx.fillRect(i, 0, 2, 100);
+ i+=2;
+ window.requestAnimationFrame(draw_slice);
+}
+
+draw_slice();
+</script>
+</body>
+</head>
« 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