Skip to content

Commit 7b12beb

Browse files
committed
fix drawing regl lines only cases on shared WebGL
1 parent 5718547 commit 7b12beb

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

Diff for: src/traces/scattergl/plot.js

+8
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ var exports = module.exports = function plot(gd, subplot, cdata) {
6060
linkTraces(gd, subplot, cdata);
6161

6262
if(scene.dirty) {
63+
if(
64+
(scene.line2d || scene.error2d) &&
65+
!(scene.scatter2d || scene.fill2d || scene.glText)
66+
) {
67+
// Fixes shared WebGL context drawing lines only case
68+
regl.clear({});
69+
}
70+
6371
// make sure scenes are created
6472
if(scene.error2d === true) {
6573
scene.error2d = createError(regl);

Diff for: test/image/compare_pixels_test.js

-12
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,6 @@ for(var i = 0; i < allMockList.length; i++) {
113113
continue;
114114
}
115115

116-
// the following mocks than only have regl-line2d lines (no morkers),
117-
// do not render at first draw when using virtual webgl. TODO: find a fix
118-
if(virtualWebgl && [
119-
'gl2d_connect_gaps',
120-
'gl2d_line_select',
121-
'gl2d_lines_almost_horizontal_vertical',
122-
'gl2d_scattergl_simple_line_reversed_ranges',
123-
'gl2d_subplots_anchor'
124-
].indexOf(mockName) !== -1) {
125-
continue;
126-
}
127-
128116
var isMapbox = mockName.substr(0, 7) === 'mapbox_';
129117
var isOtherFlaky = [
130118
// list flaky mocks other than mapbox:

0 commit comments

Comments
 (0)