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

Unified Diff: tools/perf/page_sets/trivial_sites/trivial_canvas.html

Issue 2131413003: Add 2d Canvas power test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « tools/perf/page_sets/mac_gpu_sites.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/trivial_sites/trivial_canvas.html
diff --git a/tools/perf/page_sets/trivial_sites/trivial_canvas.html b/tools/perf/page_sets/trivial_sites/trivial_canvas.html
new file mode 100644
index 0000000000000000000000000000000000000000..567193796aeae1d75dea787512b589330a631fd3
--- /dev/null
+++ b/tools/perf/page_sets/trivial_sites/trivial_canvas.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<!--
+Copyright 2016 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+<html style="height:100%">
+<head>
+ <style>
+ html, body {
+ margin: 0;
+ padding: 0;
+ }
+ </style>
+</head>
+<body style="height:100%">
+ <canvas id="canvas" width="200" height="100"></canvas>
+</body>
+<script>
+ var canvas = document.querySelector('canvas');
+ canvas.style.width ='100%';
+ canvas.style.height='100%';
+ canvas.width = canvas.offsetWidth;
+ canvas.height = canvas.offsetHeight;
+ var ctx = canvas.getContext("2d");
+ var rColor = 0;
+
+ function animate() {
+ rColor += 1;
+ rColor %= 255;
+ ctx.fillStyle = 'rgb(' + rColor + ',0,0)';
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+ window.requestAnimationFrame(animate);
+ }
+ window.onload = animate;
+</script>
+</html>
« no previous file with comments | « tools/perf/page_sets/mac_gpu_sites.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698