25 lines
629 B
HTML
25 lines
629 B
HTML
<!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 = 'rgba(0,128,0,0.5)';
|
|
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")
|
|
context.globalCompositeOperation = "destination-atop";
|
|
|
|
PerfTestRunner.measureRunsPerSecond({run: function() {
|
|
context.drawImage(source, 0, 0);
|
|
}});
|
|
</script>
|
|
</body>
|
|
</html>
|