File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,15 @@ module.exports = class CanvasLayer {
1010 * @type {HTMLCanvasElement }
1111 */
1212 this . canvas = document . createElement ( 'canvas' )
13+
14+ const desynchronized = process . platform !== "linux"
15+ const lowLatency = desynchronized
16+
1317 /**
1418 * The onscreen canvas context.
1519 * @type {CanvasRenderingContext2D }
1620 */
17- this . context = this . canvas . getContext ( '2d' , { desynchronized : true } )
21+ this . context = this . canvas . getContext ( '2d' , { desynchronized : desynchronized , lowLatency : lowLatency } )
1822 this . canvas . webkitImageSmoothingEnabled = false
1923 this . context . imageSmoothingEnabled = false
2024
@@ -29,7 +33,7 @@ module.exports = class CanvasLayer {
2933 * @type {CanvasRenderingContext2D }
3034 * @access private
3135 */
32- this . offscreenContext = this . offscreenCanvas . getContext ( '2d' , { desynchronized : true } )
36+ this . offscreenContext = this . offscreenCanvas . getContext ( '2d' , { desynchronized : desynchronized , lowLatency : lowLatency } )
3337 this . offscreenCanvas . webkitImageSmoothingEnabled = false
3438 this . offscreenContext . imageSmoothingEnabled = false
3539 }
You can’t perform that action at this time.
0 commit comments