summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/page_sets/tough_canvas_cases.json1
-rw-r--r--tools/perf/page_sets/tough_canvas_cases/canvas-animation-no-clear.html38
2 files changed, 39 insertions, 0 deletions
diff --git a/tools/perf/page_sets/tough_canvas_cases.json b/tools/perf/page_sets/tough_canvas_cases.json
index f3e6da8..895cd42 100644
--- a/tools/perf/page_sets/tough_canvas_cases.json
+++ b/tools/perf/page_sets/tough_canvas_cases.json
@@ -44,6 +44,7 @@
{ "url": "file:///tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=image_with_shadow&back=image" },
{ "url": "file:///tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=filled_path&back=gradient" },
{ "url": "file:///tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=text&back=white&ball_count=15" },
+ { "url": "file:///tough_canvas_cases/canvas-animation-no-clear.html" },
{ "url": "file:///../../../chrome/test/data/perf/canvas_bench/single_image.html" },
{ "url": "file:///../../../chrome/test/data/perf/canvas_bench/many_images.html" }
]
diff --git a/tools/perf/page_sets/tough_canvas_cases/canvas-animation-no-clear.html b/tools/perf/page_sets/tough_canvas_cases/canvas-animation-no-clear.html
new file mode 100644
index 0000000..2f26384
--- /dev/null
+++ b/tools/perf/page_sets/tough_canvas_cases/canvas-animation-no-clear.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Composited canvases with internal animation</title>
+</head>
+<body>
+<script>
+var size = 2048;
+var numCanvases = 2;
+var canvas = new Array();
+var squareSize = size / numCanvases;
+for (i = 0; i < numCanvases; i++) {
+ var c = document.createElement("canvas");
+ c.width = c.height = size;
+ c.style.left = c.style.top = "0px";
+ c.style.position = "absolute";
+ document.body.appendChild(c);
+ canvas[i] = c;
+}
+
+function redraw() {
+ var i;
+ for (i = 0; i < numCanvases; i++) {
+ var c = canvas[i];
+ var ctx = c.getContext("2d");
+ ctx.fillStyle = "rgba(1, 1, 1, 0.01)";
+ ctx.fillRect(0, 0, size, size);
+ ctx.fillStyle = "rgba(0, 255, 0, 0.5)";
+ ctx.fillRect(Math.random() * c.width, Math.random() * c.height, squareSize, squareSize);
+ }
+ window.setTimeout(redraw, 1);
+}
+window.setTimeout(redraw, 1);
+</script>
+<canvas height="2048" width="2048" style="top: 0px; left: 0px; position: absolute;"></canvas><canvas height="2048" width="2048" style="top: 0px; left: 0px; position: absolute;"></canvas>
+</body>
+</html> \ No newline at end of file