mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 18:58:11 +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:
@@ -241,8 +241,8 @@
|
||||
`.trim();
|
||||
|
||||
if (!rasterizedCanvas) {
|
||||
rasterizedCanvas = await rasterizeSVGCanvas(svg, width * dpiFactor, height * dpiFactor, "image/png");
|
||||
rasterizedContext = rasterizedCanvas.getContext("2d") || undefined;
|
||||
rasterizedCanvas = await rasterizeSVGCanvas(svg, width * dpiFactor, height * dpiFactor);
|
||||
rasterizedContext = rasterizedCanvas.getContext("2d", { willReadFrequently: true }) || undefined;
|
||||
}
|
||||
if (!rasterizedContext) return undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user