Skip to content

Commit c56425e

Browse files
ibesoragithub-actions[bot]
authored andcommitted
Further optimize canvas read-backs
GitOrigin-RevId: 1c0227612db8f72d34f0c5198d749ba46d13b650
1 parent dd69d3d commit c56425e

File tree

8 files changed

+2
-2
lines changed

8 files changed

+2
-2
lines changed

src/data/usvg/usvg_pb_renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function renderIcon(icon: Icon, options: RasterizationOptions): ImageData
8181

8282
if (canvas === null) {
8383
canvas = getCanvas(10, 10);
84-
context = canvas.getContext('2d') as Context;
84+
context = canvas.getContext('2d', {willReadFrequently: true}) as Context;
8585
}
8686

8787
canvas.width = renderedWidth;
10.3 KB
Loading
10.7 KB
Loading
8.43 KB
Loading
8.32 KB
Loading
7.94 KB
Loading
8.32 KB
Loading

test/integration/render-tests/symbol-sort-key/icon-expression/style.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"version": 8,
33
"metadata": {
44
"test": {
5-
"allowed": 0.00044,
5+
"allowed": 0.00049,
66
"pixelRatio": 2,
77
"height": 64,
88
"width": 64

0 commit comments

Comments
 (0)