Skip to content

Commit

Permalink
Turn on canvas frequent read flag (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
whscullin authored May 17, 2024
1 parent 24d8e4f commit 36a3d21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/gl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,9 @@ export class VideoModesGL implements VideoModes {
private e: boolean
) {
this._canvas = document.createElement('canvas');
const context = this._canvas.getContext('2d');
const context = this._canvas.getContext('2d', {
willReadFrequently: true,
});
if (!context) {
throw new Error('no 2d context');
}
Expand Down

0 comments on commit 36a3d21

Please sign in to comment.