mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 16:08:12 +08:00
Fix ~1 second delay opening new document in Chrome by correctly setting willReadFrequently (#2962)
* Fix ~1 second delay opening new document in Chrome by correctly setting willReadFrequently * Use willReadFrequently in a couple more places
This commit is contained in:
@@ -516,7 +516,7 @@ export class Color {
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.width = 1;
|
||||
canvas.height = 1;
|
||||
const context = canvas.getContext("2d");
|
||||
const context = canvas.getContext("2d", { willReadFrequently: true });
|
||||
if (!context) return undefined;
|
||||
|
||||
context.clearRect(0, 0, 1, 1);
|
||||
|
||||
Reference in New Issue
Block a user