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

Unified Diff: LayoutTests/fast/canvas/canvas-partial-invalidation-zoomed.html

Issue 402613006: Fixing 2D canvas invalidation region tracking. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixups and baselines Created 6 years, 5 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
Index: LayoutTests/fast/canvas/canvas-partial-invalidation-zoomed.html
diff --git a/LayoutTests/fast/canvas/canvas-partial-invalidation-zoomed.html b/LayoutTests/fast/canvas/canvas-partial-invalidation-zoomed.html
new file mode 100644
index 0000000000000000000000000000000000000000..f668b8c463a2755c57ef7ad9759e79433b4131b7
--- /dev/null
+++ b/LayoutTests/fast/canvas/canvas-partial-invalidation-zoomed.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<body style="zoom: 1.2">
+ <p>An all green square should appear below</p>
+ <canvas id="A" width=300 height=300></canvas>
+ <script type="text/javascript" charset="utf-8">
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+ var context;
+
+ window.onload = function() {
+ context = document.getElementById("A").getContext("2d");
+ context.fillStyle = 'red';
+ context.fillRect(1, 1, 298, 298);
+ requestAnimationFrame(doUpdate1);
+ }
+
+ function doUpdate1() {
+ context.fillStyle = 'red';
+ context.fillRect(1, 1, 298, 298);
+ // We need to chain 2 rAFs because the first rAF may be called
+ // before the initial presentation.
+ requestAnimationFrame(doUpdate2);
+ }
+
+ function doUpdate2() {
+ context.fillStyle = 'green';
+ context.fillRect(1, 1, 298, 298);
+ testRunner.notifyDone();
+ }
+
+ </script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698