blob: 8cafd02d0e52c1e02978a39e28811e026426f320 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../resources/runner.js"></script>
<script>
var source = document.createElement("canvas");
source.width = 300;
source.height = 150;
source.getContext("2d").fillStyle = 'green';
source.getContext("2d").fillRect(0, 0, source.width, source.height);
var target = document.createElement("canvas");
target.width = source.width;
target.height = source.height;
var context = target.getContext("2d")
PerfTestRunner.measureRunsPerSecond({
description: "Measures performance of drawing an image onto a canvas.",
run: function() {
context.drawImage(source, 0, 0);
}
});
</script>
</body>
</html>