Skip to content

Upgrade Flow to v0.188.0 #12588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 72 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
38f668e
Fix `class-object-subtyping`
stepankuzmin Jan 23, 2023
4616996
More fixes
stepankuzmin Jan 23, 2023
e1809e3
flow fix
stepankuzmin Jan 24, 2023
d91278f
Fix flow
stepankuzmin Jan 27, 2023
fec0da1
Update vectortile_to_geojson
stepankuzmin Feb 23, 2023
4adc958
Fix eslint indentation
stepankuzmin Feb 23, 2023
46cd568
Fix method-unbinding
stepankuzmin Feb 23, 2023
4340845
Update flow to v0.155.1
stepankuzmin Feb 23, 2023
e519826
Fix method-unbinding
stepankuzmin Feb 23, 2023
d676094
flow 0.153.0 eslint fix (#12586)
davojta Feb 23, 2023
a554168
Fix method-unbinding in evaluation_parameters.js
stepankuzmin Feb 23, 2023
4e3506a
Fix method-unbinding in uniform_binding.js
stepankuzmin Feb 23, 2023
5c2cbce
Fix method-unbinding in lng_lat_bounds.js
stepankuzmin Feb 23, 2023
e04972e
Fix method-unbinding in canvas_source.js
stepankuzmin Feb 23, 2023
a0d00be
Fix method-unbinding in video_source.js
stepankuzmin Feb 23, 2023
de55ec0
Fix method-unbinding in style/ and style-spec/
stepankuzmin Feb 23, 2023
64327c3
fix eslint problems for style files
davojta Feb 23, 2023
5ca6152
fix flow problems for ui/handler files
davojta Feb 23, 2023
001a83d
Fix method-unbinding in mercator_coordinate.js and src/util/debug.js
stepankuzmin Feb 23, 2023
ff04d62
fix flow problems for ui/control files
davojta Feb 23, 2023
362eb1f
Fix src/util/debug.js
stepankuzmin Feb 23, 2023
3ff8f41
fix flow problems for ui, util and source files
davojta Feb 23, 2023
edc4998
Fix leftovers
stepankuzmin Feb 23, 2023
a30c00d
Update flow to v0.156.0
stepankuzmin Feb 23, 2023
e8da18a
Revert style-spec/expression/
stepankuzmin Feb 23, 2023
f7d2106
Update style-spec/expression/index.js
stepankuzmin Feb 23, 2023
a50b8ad
Ignore method-unbinding in style-spec/expression definitions
stepankuzmin Feb 23, 2023
ca72fe9
Upgrade Flow to v0.171.0
stepankuzmin Feb 23, 2023
d47d44c
Upgrade Flow to v0.175.0
stepankuzmin Feb 23, 2023
caf9658
fix runtime error for flow annotation
davojta Feb 23, 2023
246242c
Upgrade Flow to v0.176.0
stepankuzmin Feb 23, 2023
83685d3
Upgrade Flow to v0.177.0
stepankuzmin Feb 23, 2023
d9eb1b8
fix formatting for custom_source.js
davojta Feb 24, 2023
6c6abcd
fix lint for touch_zoom_rotate.js
davojta Feb 24, 2023
505a21a
Update src/util/mapbox.js
stepankuzmin Feb 24, 2023
2759053
fix formatting for worker.js
davojta Feb 24, 2023
47a350a
fix formatting for utils/actor.js
davojta Feb 24, 2023
96ac32b
fix formatting for utils/scheduler.js
davojta Feb 24, 2023
0197119
fix formatting for ui/camera.js
davojta Feb 24, 2023
e79a00e
fix formatting for ui/controls
davojta Feb 24, 2023
87fd1bb
fix formatting for ui/controls
davojta Feb 24, 2023
b46232a
Upgrade Flow to v0.178.0
stepankuzmin Feb 24, 2023
e25cb35
Upgrade Flow to v0.179.0
stepankuzmin Feb 24, 2023
521a657
Upgrade Flow to v0.180.0
stepankuzmin Feb 24, 2023
d46b36e
fix formatting for uniform_binding.js
davojta Feb 24, 2023
eb3ab5a
Upgrade Flow to v0.181.0
stepankuzmin Feb 24, 2023
ab2f9e7
Upgrade Flow to v0.182.0
stepankuzmin Feb 24, 2023
0adaf84
Upgrade Flow to v0.183.0
stepankuzmin Feb 24, 2023
31edc5b
fix formatting for ui/map.js
davojta Feb 24, 2023
2647e71
Upgrade Flow to v0.184.0
stepankuzmin Feb 24, 2023
67f61a7
fix formatting for ui/handler_manager.js
davojta Feb 24, 2023
18ae169
fix formatting for rest of ui folder
davojta Feb 24, 2023
2eec22b
fix formatting for terrain.js
davojta Feb 24, 2023
665ef89
fix formatting for style.js
davojta Feb 24, 2023
c84eef7
fix formatting for custom_style_layer.js
davojta Feb 24, 2023
6a10d00
fix formatting for source_cache.js
davojta Feb 24, 2023
a63ed32
fix formatting for grid_index.js
davojta Feb 24, 2023
cd99939
fix formatting for expression/index.js
davojta Feb 24, 2023
be873dd
Enable `constrain_writes` inference mode
stepankuzmin Feb 24, 2023
5070edd
Upgrade Flow to v0.185.0
stepankuzmin Feb 24, 2023
4f8f733
Upgrade Flow to v0.186.0
stepankuzmin Feb 24, 2023
234501c
Upgrade Flow to v0.187.0
stepankuzmin Feb 24, 2023
ce6bece
Upgrade Flow to v0.188.0
stepankuzmin Feb 24, 2023
1f789b3
Fix src/geo/transform.js
stepankuzmin Feb 24, 2023
cb52c71
Cleanup
stepankuzmin Feb 24, 2023
17eef44
Cleanup formatting
stepankuzmin Feb 24, 2023
a055f35
Fix layoutType in program_configuration.js
stepankuzmin Feb 24, 2023
64bdec6
Fix ProgramConfiguration constructor
stepankuzmin Feb 27, 2023
3a38962
Fix EVENTS_URL sanitization
stepankuzmin Feb 27, 2023
3a85820
Cleanup
stepankuzmin Feb 27, 2023
4ca5ac4
Revert flow method-unbinding fixes and supress errors
stepankuzmin Mar 31, 2023
c6302c3
Fix painter.js
stepankuzmin Apr 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
.*/test/build/downstream-flow-fixture/.*

[version]
0.152.0
0.188.0

[options]

Expand Down
1 change: 1 addition & 0 deletions bench/lib/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class Benchmark {
return this._end();
}

// $FlowFixMe[duplicate-class-member]
_measureAsync(): Promise<Array<Measurement>> {
const time = performance.now() - this._start;
this._elapsed += time;
Expand Down
2 changes: 1 addition & 1 deletion bench/lib/tile_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default class TileParser {
return Promise.all([
createStyle(this.styleJSON),
fetchTileJSON(mapStub._requestManager, (this.styleJSON.sources[this.sourceID]: any).url)
]).then(([style: Style, tileJSON: TileJSON]) => {
]).then(([style, tileJSON]: [Style, TileJSON]) => {
this.style = style;
this.tileJSON = tileJSON;
});
Expand Down
12 changes: 6 additions & 6 deletions flow-typed/geojson.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ declare module "@mapbox/geojson-types" {
geometries: Array<GeoJSONGeometry>
};

declare export type GeoJSONFeature = {
type: 'Feature',
geometry: ?GeoJSONGeometry,
properties: ?{},
id?: number | string
};
declare export interface GeoJSONFeature {
type: 'Feature';
geometry: ?GeoJSONGeometry;
properties: ?{};
id?: number | string;
}

declare export type GeoJSONFeatureCollection = {
type: 'FeatureCollection',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^39.6.4",
"flow-bin": "0.152.0",
"flow-bin": "0.188.0",
"gl": "6.0.2",
"glob": "^8.0.3",
"is-builtin-module": "^3.2.0",
Expand Down
1 change: 1 addition & 0 deletions src/data/bucket/circle_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class CircleBucket<Layer: CircleStyleLayer | HeatmapStyleLayer> implements Bucke
const needGeometry = this.layers[0]._featureFilter.needGeometry;
const evaluationFeature = toEvaluationFeature(feature, needGeometry);

// $FlowFixMe[method-unbinding]
if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;

const sortKey = circleSortKey ?
Expand Down
1 change: 1 addition & 0 deletions src/data/bucket/fill_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class FillBucket implements Bucket {
const needGeometry = this.layers[0]._featureFilter.needGeometry;
const evaluationFeature = toEvaluationFeature(feature, needGeometry);

// $FlowFixMe[method-unbinding]
if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;

const sortKey = fillSortKey ?
Expand Down
1 change: 1 addition & 0 deletions src/data/bucket/fill_extrusion_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ class FillExtrusionBucket implements Bucket {
const needGeometry = this.layers[0]._featureFilter.needGeometry;
const evaluationFeature = toEvaluationFeature(feature, needGeometry);

// $FlowFixMe[method-unbinding]
if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;

const bucketFeature: BucketFeature = {
Expand Down
1 change: 1 addition & 0 deletions src/data/bucket/line_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ class LineBucket implements Bucket {
const needGeometry = this.layers[0]._featureFilter.needGeometry;
const evaluationFeature = toEvaluationFeature(feature, needGeometry);

// $FlowFixMe[method-unbinding]
if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;

const sortKey = lineSortKey ?
Expand Down
1 change: 1 addition & 0 deletions src/data/bucket/symbol_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ class SymbolBucket implements Bucket {

const needGeometry = layer._featureFilter.needGeometry;
const evaluationFeature = toEvaluationFeature(feature, needGeometry);
// $FlowFixMe[method-unbinding]
if (!layer._featureFilter.filter(globalProperties, evaluationFeature, canonical)) {
continue;
}
Expand Down
26 changes: 13 additions & 13 deletions src/data/dem_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ const unpackVectors = {
terrarium: [256.0, 1.0, 1.0 / 256.0, 32768.0]
};

function unpackMapbox(r: number, g: number, b: number): number {
// unpacking formula for mapbox.terrain-rgb:
// https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb
return ((r * 256 * 256 + g * 256.0 + b) / 10.0 - 10000.0);
}

function unpackTerrarium(r: number, g: number, b: number): number {
// unpacking formula for mapzen terrarium:
// https://aws.amazon.com/public-datasets/terrain/
return ((r * 256 + g + b / 256) - 32768.0);
}

export default class DEMData {
uid: number;
pixels: Uint8Array;
Expand Down Expand Up @@ -86,7 +98,7 @@ export default class DEMData {
y = clamp(y, -1, this.dim);
}
const index = this._idx(x, y) * 4;
const unpack = this.encoding === "terrarium" ? this._unpackTerrarium : this._unpackMapbox;
const unpack = this.encoding === "terrarium" ? unpackTerrarium : unpackMapbox;
return unpack(this.pixels[index], this.pixels[index + 1], this.pixels[index + 2]);
}

Expand All @@ -103,18 +115,6 @@ export default class DEMData {
return (y + 1) * this.stride + (x + 1);
}

_unpackMapbox(r: number, g: number, b: number): number {
// unpacking formula for mapbox.terrain-rgb:
// https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb
return ((r * 256 * 256 + g * 256.0 + b) / 10.0 - 10000.0);
}

_unpackTerrarium(r: number, g: number, b: number): number {
// unpacking formula for mapzen terrarium:
// https://aws.amazon.com/public-datasets/terrain/
return ((r * 256 + g + b / 256) - 32768.0);
}

static pack(altitude: number, encoding: DEMEncoding): [number, number, number, number] {
const color = [0, 0, 0, 0];
const vector = DEMData.getUnpackVector(encoding);
Expand Down
5 changes: 4 additions & 1 deletion src/data/feature_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,11 @@ class FeatureIndex {

if (filter.needGeometry) {
const evaluationFeature = toEvaluationFeature(feature, true);
// $FlowFixMe[method-unbinding]
if (!filter.filter(new EvaluationParameters(this.tileID.overscaledZ), evaluationFeature, this.tileID.canonical)) {
return;
}
// $FlowFixMe[method-unbinding]
} else if (!filter.filter(new EvaluationParameters(this.tileID.overscaledZ), feature)) {
return;
}
Expand Down Expand Up @@ -305,8 +307,9 @@ class FeatureIndex {
let id = feature.id;
if (this.promoteId) {
const propName = typeof this.promoteId === 'string' ? this.promoteId : this.promoteId[sourceLayerId];
// $FlowFixMe[incompatible-type] - Flow can't narrow the id type from IVectorTileFeature.id
if (propName != null) id = feature.properties[propName];
if (typeof id === 'boolean') id = Number(id);
if (typeof id === 'boolean') id = Number(id);
}
return id;
}
Expand Down
2 changes: 1 addition & 1 deletion src/data/load_geometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function preparePoint(point: Point, scale: number) {
}

// a subset of VectorTileGeometry
type FeatureWithGeometry = {
interface FeatureWithGeometry {
extent: number;
type: 1 | 2 | 3;
loadGeometry(): Array<Array<Point>>;
Expand Down
18 changes: 17 additions & 1 deletion src/data/program_configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ class ConstantBinder implements UniformBinder {
uniform.set(program, uniformName, currentValue.constantOr(this.value));
}

// $FlowFixMe[method-unbinding]
getBinding(context: Context, _: string): $Shape<Uniform<any>> {
// $FlowFixMe[method-unbinding]
return (this.type === 'color') ?
new UniformColor(context) :
new Uniform1f(context);
Expand Down Expand Up @@ -136,7 +138,9 @@ class PatternConstantBinder implements UniformBinder {
if (pos) uniform.set(program, uniformName, pos);
}

// $FlowFixMe[method-unbinding]
getBinding(context: Context, name: string): $Shape<Uniform<any>> {
// $FlowFixMe[method-unbinding]
return name === 'u_pattern' || name === 'u_dash' ?
new Uniform4f(context) :
new Uniform1f(context);
Expand Down Expand Up @@ -168,6 +172,7 @@ class SourceExpressionBinder implements AttributeBinder {
populatePaintArray(newLength: number, feature: Feature, imagePositions: SpritePositions, availableImages: Array<string>, canonical?: CanonicalTileID, formattedSection?: FormattedSection) {
const start = this.paintVertexArray.length;
assert(Array.isArray(availableImages));
// $FlowFixMe[method-unbinding]
const value = this.expression.evaluate(new EvaluationParameters(0), feature, {}, canonical, availableImages, formattedSection);
this.paintVertexArray.resize(newLength);
this._setPaintValue(start, newLength, value);
Expand Down Expand Up @@ -238,7 +243,9 @@ class CompositeExpressionBinder implements AttributeBinder, UniformBinder {
}

populatePaintArray(newLength: number, feature: Feature, imagePositions: SpritePositions, availableImages: Array<string>, canonical?: CanonicalTileID, formattedSection?: FormattedSection) {
// $FlowFixMe[method-unbinding]
const min = this.expression.evaluate(new EvaluationParameters(this.zoom), feature, {}, canonical, availableImages, formattedSection);
// $FlowFixMe[method-unbinding]
const max = this.expression.evaluate(new EvaluationParameters(this.zoom + 1), feature, {}, canonical, availableImages, formattedSection);
const start = this.paintVertexArray.length;
this.paintVertexArray.resize(newLength);
Expand Down Expand Up @@ -288,6 +295,7 @@ class CompositeExpressionBinder implements AttributeBinder, UniformBinder {
uniform.set(program, uniformName, factor);
}

// $FlowFixMe[method-unbinding]
getBinding(context: Context, _: string): Uniform1f {
return new Uniform1f(context);
}
Expand Down Expand Up @@ -387,7 +395,7 @@ export default class ProgramConfiguration {
const names = paintAttributeNames(property, layer.type);
const expression = value.value;
const type = value.property.specification.type;
const useIntegerZoom = value.property.useIntegerZoom;
const useIntegerZoom = !!value.property.useIntegerZoom;
const isPattern = property === 'line-dasharray' || property.endsWith('pattern');
const sourceException = property === 'line-dasharray' && (layer.layout: any).get('line-cap').value.kind !== 'constant';

Expand All @@ -400,12 +408,19 @@ export default class ProgramConfiguration {
} else if (expression.kind === 'source' || sourceException || isPattern) {
const StructArrayLayout = layoutType(property, type, 'source');
this.binders[property] = isPattern ?
// $FlowFixMe[prop-missing]
// $FlowFixMe[incompatible-call] - expression can be a `composite` or `constant` kind expression
new PatternCompositeBinder(expression, names, type, StructArrayLayout, layer.id) :
// $FlowFixMe[prop-missing]
// $FlowFixMe[incompatible-call] - expression can be a `composite` or `constant` kind expression
new SourceExpressionBinder(expression, names, type, StructArrayLayout);

keys.push(`/a_${property}`);

} else {
const StructArrayLayout = layoutType(property, type, 'composite');
// $FlowFixMe[prop-missing]
// $FlowFixMe[incompatible-call] — expression can be a `constant` kind expression
this.binders[property] = new CompositeExpressionBinder(expression, names, type, useIntegerZoom, zoom, StructArrayLayout);
keys.push(`/z_${property}`);
}
Expand Down Expand Up @@ -660,6 +675,7 @@ const defaultLayouts = {

function layoutType(property, type, binderType) {
const layoutException = propertyExceptions[property];
// $FlowFixMe[prop-missing] - we don't cover all types in defaultLayouts for some reason
return (layoutException && layoutException[binderType]) || defaultLayouts[type][binderType];
}

Expand Down
1 change: 1 addition & 0 deletions src/geo/lng_lat_bounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class LngLatBounds {
if (!sw2 || !ne2) return this;

} else if (Array.isArray(obj)) {
// $FlowFixMe[method-unbinding]
if (obj.length === 4 || obj.every(Array.isArray)) {
const lngLatBoundsObj = ((obj: any): LngLatBoundsLike);
return this.extend(LngLatBounds.convert(lngLatBoundsObj));
Expand Down
2 changes: 1 addition & 1 deletion src/geo/projection/tile_transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function tileAABB(tr: Transform, numTiles: number, z: number, x: number,
[(wrap + tx2) * numTiles, numTiles * ty2, max]);
}

export function getTilePoint(tileTransform: TileTransform, {x, y}: {x: number, y: number}, wrap: number = 0): Point {
export function getTilePoint(tileTransform: TileTransform, {x, y}: interface { x: number, y: number }, wrap: number = 0): Point {
return new Point(
((x - wrap) * tileTransform.scale - tileTransform.x) * EXTENT,
(y * tileTransform.scale - tileTransform.y) * EXTENT);
Expand Down
5 changes: 3 additions & 2 deletions src/geo/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Transform {
mercatorFogMatrix: Float32Array;

// Projection from world coordinates (mercator scaled by worldSize) to clip coordinates
projMatrix: Array<number>;
projMatrix: Array<number> | Float32Array | Float64Array;
invProjMatrix: Float64Array;

// Same as projMatrix, pixel-aligned to avoid fractional pixels for raster tiles
Expand Down Expand Up @@ -580,6 +580,7 @@ class Transform {

let changed = false;
if (options.orientation && !quat.exactEquals(options.orientation, this._camera.orientation)) {
// $FlowFixMe[incompatible-call] - Flow can't infer that orientation is not null
changed = this._setCameraOrientation(options.orientation);
}

Expand Down Expand Up @@ -1874,7 +1875,7 @@ class Transform {
cameraToClip[8] = -offset.x * 2 / this.width;
cameraToClip[9] = offset.y * 2 / this.height;

let m = mat4.mul([], cameraToClip, worldToCamera);
let m: Array<number> | Float32Array | Float64Array = mat4.mul([], cameraToClip, worldToCamera);

if (this.projection.isReprojectedInTileSpace) {
// Projections undistort as you zoom in (shear, scale, rotate).
Expand Down
4 changes: 2 additions & 2 deletions src/render/draw_fill_extrusion.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function drawExtrusionTiles(painter, source, layer, coords, depthMode, stencilMo
function flatRoofsUpdate(context, source, coord, bucket, layer, terrain) {
// For all four borders: 0 - left, 1, right, 2 - top, 3 - bottom
const neighborCoord = [
coord => {
(coord: OverscaledTileID) => {
let x = coord.canonical.x - 1;
let w = coord.wrap;
if (x < 0) {
Expand All @@ -154,7 +154,7 @@ function flatRoofsUpdate(context, source, coord, bucket, layer, terrain) {
}
return new OverscaledTileID(coord.overscaledZ, w, coord.canonical.z, x, coord.canonical.y);
},
coord => {
(coord: OverscaledTileID) => {
let x = coord.canonical.x + 1;
let w = coord.wrap;
if (x === 1 << coord.canonical.z) {
Expand Down
2 changes: 1 addition & 1 deletion src/render/draw_symbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function drawLayerSymbols(painter, sourceCache, layer, coords, isText, translate

const mercatorCameraUp = [0, -1, 0];

let globeCameraUp = mercatorCameraUp;
let globeCameraUp: [number, number, number] = mercatorCameraUp;
if ((isGlobeProjection || tr.mercatorFromTransition) && !rotateWithMap) {
// Each symbol rotating with the viewport requires per-instance information about
// how to align with the viewport. In 2D case rotation is shared between all of the symbols and
Expand Down
1 change: 1 addition & 0 deletions src/render/image_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ class ImageManager extends Evented {
this.dirty = false;
}

if (!this.atlasTexture) return; // Flow can't infer that atlasTexture is defined here
this.atlasTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);
}

Expand Down
1 change: 1 addition & 0 deletions src/render/painter.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ class Painter {
// With terrain on, renders the depth buffer into a texture.
// This texture is used for occlusion testing (labels)
if (this.terrain && (this.style.hasSymbolLayers() || this.style.hasCircleLayers())) {
// $FlowFixMe[incompatible-use] - Flow can't infer that terrain is not null
this.terrain.drawDepth();
}

Expand Down
Loading