Skip to content

Commit bda70a8

Browse files
committed
Add a tentative new canvas subtest, which exercises more of the 2D canvas API, intended to subsume Arcs, Paths and Lines.
1 parent baf37c1 commit bda70a8

File tree

8 files changed

+1169
-1
lines changed

8 files changed

+1169
-1
lines changed

MotionMark/resources/debug-runner/debug-runner.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ class DebugBenchmarkController extends BenchmarkController {
534534
this.updateUIStrings();
535535
this.graphController = new GraphController;
536536

537-
document.forms["benchmark-options"].addEventListener("change", () => { this.onBenchmarkOptionsChanged() }, true);
537+
document.forms["benchmark-options"].addEventListener("change", (event) => { this.onBenchmarkOptionsChanged(event) }, true);
538538
document.forms["graph-type"].addEventListener("change", () => { this.graphController.onGraphTypeChanged() }, true);
539539
document.forms["time-graph-options"].addEventListener("change", () => { this.graphController.onTimeGraphOptionsChanged() }, true);
540540
document.forms["complexity-graph-options"].addEventListener("change", () => { this.graphController.onComplexityGraphOptionsChanged() }, true);

MotionMark/resources/debug-runner/tests.js

+9
Original file line numberDiff line numberDiff line change
@@ -456,3 +456,12 @@ Suites.push(new Suite("Basic canvas path suite",
456456
}
457457
]
458458
));
459+
460+
Suites.push(new Suite("Dev suite",
461+
[
462+
{
463+
url: "dev/radial-chart/radial-chart.html",
464+
name: "Canvas Radial Chart"
465+
}
466+
]
467+
));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Canvas Radial Chart
2+
3+
Goals
4+
-----
5+
6+
A single canvas test that exercises much of the canvas 2D API, replacing `Paths`, `Arcs` and `Lines`.
7+
8+
9+
Design
10+
------
11+
12+
A radial chart. Unit of work is a chart "segment". With higher complexities, more rings of segments are created.
13+
14+
15+
Features tested
16+
---------------
17+
18+
* text drawing
19+
* image drawing
20+
* lines, arcs, curves
21+
* clipping to a path
22+
* gradients
23+
24+
25+
Work per measued frame
26+
----------------------
27+
28+
Redraw of the entire canvas
29+
30+
31+
Remaining work
32+
--------------
33+
34+
* Add images for the rest of the deparements
35+
* Address some overlapping text issues
36+
37+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!--
2+
Copyright (C) 2015-2017 Apple Inc. All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions
6+
are met:
7+
1. Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
2. Redistributions in binary form must reproduce the above copyright
10+
notice, this list of conditions and the following disclaimer in the
11+
documentation and/or other materials provided with the distribution.
12+
13+
THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23+
THE POSSIBILITY OF SUCH DAMAGE.
24+
-->
25+
<!DOCTYPE html>
26+
<html>
27+
<head>
28+
<meta charset="utf-8">
29+
<link rel="stylesheet" type="text/css" href="../../resources/stage.css">
30+
<style>
31+
#stage-canvas {
32+
width: 100%;
33+
height: 100%;
34+
}
35+
</style>
36+
</head>
37+
<body>
38+
<div id="stage">
39+
<canvas id="stage-canvas"></canvas>
40+
</div>
41+
<script src="../../../resources/strings.js"></script>
42+
<script src="../../../resources/extensions.js"></script>
43+
<script src="../../../resources/statistics.js"></script>
44+
<script src="../../resources/math.js"></script>
45+
<script src="../../resources/main.js"></script>
46+
<script src="resources/radial-chart.js"></script>
47+
</body>
48+
</html>

0 commit comments

Comments
 (0)