From e0b0e8ebcc40896b2b92e0e9c558ebb509f4cff8 Mon Sep 17 00:00:00 2001 From: Tristan <44310937+tristan-morris@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:23:34 +1100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Volodymyr Agafonkin --- src/render/program/line_program.js | 2 +- src/terrain/draw_terrain_raster.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/render/program/line_program.js b/src/render/program/line_program.js index 887068a1e18..e92aaf587d3 100644 --- a/src/render/program/line_program.js +++ b/src/render/program/line_program.js @@ -93,7 +93,7 @@ const lineUniformValues = ( 'u_dash_image': 0, 'u_gradient_image': 1, 'u_image_height': imageHeight, - 'u_texsize': hasDash(layer) ? (tile.lineAtlasTexture ? tile.lineAtlasTexture.size : [0, 0]) : [0, 0], + 'u_texsize': hasDash(layer) && tile.lineAtlasTexture ? tile.lineAtlasTexture.size : [0, 0], 'u_tile_units_to_pixels': calculateTileRatio(tile, painter.transform), 'u_alpha_discard_threshold': 0.0, 'u_trim_offset': trimOffset, diff --git a/src/terrain/draw_terrain_raster.js b/src/terrain/draw_terrain_raster.js index 197942712e0..6fcef850582 100644 --- a/src/terrain/draw_terrain_raster.js +++ b/src/terrain/draw_terrain_raster.js @@ -336,8 +336,6 @@ function drawTerrainRaster(painter: Painter, terrain: Terrain, sourceCache: Sour // Bind the main draped texture context.activeTexture.set(gl.TEXTURE0); if (tile.texture) { - // This call seemed invalid with 3 args? - // tile.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE, gl.LINEAR_MIPMAP_NEAREST); tile.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE); }