blob: 05eec64c67bf39d1fba2a7acb780f0d55958a103 [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")
function ensureComplete() {
// Drawing to self is just to flush out the content when
// accelerated 2D canvas or display list 2D canvas are in use.
context.drawImage(target, 0, 0, 1, 1, 0, 0, 1, 1);
}
PerfTestRunner.measureRunsPerSecond({
description: "Measures performance of drawing an image onto a canvas that is not pixel aligned.",
run: function() {
context.drawImage(source, 10.5, 10.5, 200, 200);
ensureComplete();
}
});
</script>
</body>
</html>