Skip to content

Commit fa2743e

Browse files
committed
Generate virtual-webgl specific images
1 parent 809745d commit fa2743e

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

test/image/compare_pixels_test.mjs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,6 @@ const flakyListMaps = new Set([
7575
'map_predefined-styles1',
7676
'map_predefined-styles2'
7777
]);
78-
const flakyListVirtualWebgl = new Set([
79-
'gl3d_ibm-plot',
80-
'gl3d_isosurface_2surfaces-checker_spaceframe',
81-
'gl3d_opacity-scaling-spikes',
82-
'gl3d_cone-wind',
83-
'gl3d_isosurface_math',
84-
'gl3d_scatter3d-blank-text',
85-
'gl3d_mesh3d_surface3d_scatter3d_line3d_error3d_log_reversed_ranges'
86-
]);
87-
8878
if (virtualWebgl) {
8979
allMockList = allMockList.filter((a) => a.startsWith('gl') || a.startsWith('map'));
9080
}
@@ -103,6 +93,7 @@ for (let mockName of allMockList) {
10393
else threshold = 0;
10494

10595
if (mathjax3) mockName = 'mathjax3___' + mockName;
96+
if (virtualWebgl) mockName = 'virtual-webgl___' + mockName;
10697

10798
const { baseline: base, test, diff } = getImagePaths(mockName);
10899

@@ -139,11 +130,6 @@ for (let mockName of allMockList) {
139130
continue;
140131
}
141132

142-
if (virtualWebgl) {
143-
if (flakyListVirtualWebgl.has(mockName)) threshold = 0.7;
144-
else threshold = Math.max(0.4, threshold);
145-
}
146-
147133
const { height, width } = img0;
148134
const imageDiff = new PNG({ width, height });
149135
const numDiffPixels = pixelmatch(img0.data, img1.data, imageDiff.data, width, height, { threshold });

test/image/make_baseline.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ async def make_baselines_async():
9393
outName = name
9494
if mathjax_version == 3:
9595
outName = "mathjax3___" + name
96+
if virtual_webgl_version == 1:
97+
outName = "virtual-webgl___" + outName
9698

9799
print(outName)
98100

0 commit comments

Comments
 (0)