Skip to content

Commit

Permalink
fixes #2797 by removing window.performance.now shim
Browse files Browse the repository at this point in the history
the shim for window.performance.now was introduced in 2014
to resolve some timing issues. at the time, it wasn't available
in all browsers, but now it's available in everything except
Opera Mini, so it seems safe to remove this shim.
  • Loading branch information
kjhollen committed Jun 15, 2018
1 parent d6d4053 commit fccf070
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/core/shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,6 @@ window.requestAnimationFrame = (function() {
);
})();

// use window.performance() to get max fast and accurate time in milliseconds
window.performance = window.performance || {};
window.performance.now = (function() {
var load_date = Date.now();
return (
window.performance.now ||
window.performance.mozNow ||
window.performance.msNow ||
window.performance.oNow ||
window.performance.webkitNow ||
function() {
return Date.now() - load_date;
}
);
})();

/**
* shim for Uint8ClampedArray.slice
* (allows arrayCopy to work with pixels[])
Expand Down

0 comments on commit fccf070

Please sign in to comment.