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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « tools/perf/page_sets/mac_gpu_sites.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
6 -->
7 <html style="height:100%">
8 <head>
9 <style>
10 html, body {
11 margin: 0;
12 padding: 0;
13 }
14 </style>
15 </head>
16 <body style="height:100%">
17 <canvas id="canvas" width="200" height="100"></canvas>
18 </body>
19 <script>
20 var canvas = document.querySelector('canvas');
21 canvas.style.width ='100%';
22 canvas.style.height='100%';
23 canvas.width = canvas.offsetWidth;
24 canvas.height = canvas.offsetHeight;
25 var ctx = canvas.getContext("2d");
26 var rColor = 0;
27
28 function animate() {
29 rColor += 1;
30 rColor %= 255;
31 ctx.fillStyle = 'rgb(' + rColor + ',0,0)';
32 ctx.fillRect(0, 0, canvas.width, canvas.height);
33 window.requestAnimationFrame(animate);
34 }
35 window.onload = animate;
36 </script>
37 </html>
OLDNEW
« 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