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

Unified Diff: third_party/WebKit/ManualTests/canvas-ClearRect-hidpi.html

Issue 1983863002: Inflate dirty rect by 1 pixel on a high DPI display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullcheck on page() Created 4 years, 7 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-ClearRect-hidpi.html
diff --git a/third_party/WebKit/ManualTests/canvas-ClearRect-hidpi.html b/third_party/WebKit/ManualTests/canvas-ClearRect-hidpi.html
new file mode 100644
index 0000000000000000000000000000000000000000..52195a704173bc3d246cb2364d3039cd0b81e902
--- /dev/null
+++ b/third_party/WebKit/ManualTests/canvas-ClearRect-hidpi.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>
+Test for crbug.com/609820. When running this test on Mac with retina display,
+the result should be a clear canvas with no artifact after a few seconds.
+</p>
+<canvas id='output' width='300' height='250'></canvas>
+<script>
+var repeat = 350;
+var x = y = 0;
+var canvas = document.getElementById("output");
+var ctx = canvas.getContext('2d');
+ctx.fillStyle = "#FF0000";
+
+requestAnimationFrame(animate);
+
+function animate()
+{
+ ctx.clearRect(x, y, 50, 50);
+ x++;
+ y++;
+ ctx.fillRect(x, y, 50, 50);
+ repeat--;
+ if (repeat > 0)
+ requestAnimationFrame(animate);
+}
+</script>
+</body>
+</html>
+
« 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