Skip to content

Commit

Permalink
Remove use of gl.lineWidth
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauren Budorick committed Oct 27, 2017
1 parent c5554ff commit 8e23f70
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions src/render/draw_collision_debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ function drawCollisionDebugGeometry(painter: Painter, sourceCache: SourceCache,

gl.uniformMatrix4fv(program.uniforms.u_matrix, false, coord.posMatrix);

if (!drawCircles) {
painter.lineWidth(1);
}

gl.uniform1f(program.uniforms.u_camera_to_center_distance, painter.transform.cameraToCenterDistance);
const pixelRatio = pixelsToTileUnits(tile, 1, painter.transform.zoom);
const scale = Math.pow(2, painter.transform.zoom - tile.coord.z);
Expand Down
2 changes: 0 additions & 2 deletions src/render/draw_debug.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @flow

const browser = require('../util/browser');
const mat4 = require('@mapbox/gl-matrix').mat4;
const EXTENT = require('../data/extent');
const VertexBuffer = require('../gl/vertex_buffer');
Expand All @@ -23,7 +22,6 @@ function drawDebugTile(painter, sourceCache, coord) {
const gl = painter.gl;

gl.disable(gl.STENCIL_TEST);
painter.lineWidth(1 * browser.devicePixelRatio);

const posMatrix = coord.posMatrix;
const program = painter.useProgram('debug');
Expand Down
1 change: 0 additions & 1 deletion src/render/draw_fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function drawFill(painter: Painter, sourceCache: SourceCache, layer: FillStyleLa

// Draw stroke
if (painter.renderPass === 'translucent' && layer.paint['fill-antialias']) {
painter.lineWidth(2);
painter.depthMask(false);

// If we defined a different color for the fill outline, we are
Expand Down
7 changes: 0 additions & 7 deletions src/render/painter.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class Painter {
_tileTextures: { [number]: Array<Texture> };
numSublayers: number;
depthEpsilon: number;
lineWidthRange: [number, number];
basicFillProgramConfiguration: ProgramConfiguration;
emptyProgramConfiguration: ProgramConfiguration;
width: number;
Expand Down Expand Up @@ -108,8 +107,6 @@ class Painter {
this.numSublayers = SourceCache.maxUnderzooming + SourceCache.maxOverzooming + 1;
this.depthEpsilon = 1 / Math.pow(2, 16);

this.lineWidthRange = gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE);

this.basicFillProgramConfiguration = ProgramConfiguration.createBasicFill();
this.emptyProgramConfiguration = new ProgramConfiguration();

Expand Down Expand Up @@ -516,10 +513,6 @@ class Painter {
return textures && textures.length > 0 ? textures.pop() : null;
}

lineWidth(width: number) {
this.gl.lineWidth(util.clamp(width, this.lineWidthRange[0], this.lineWidthRange[1]));
}

showOverdrawInspector(enabled: boolean) {
if (!enabled && !this._showOverdrawInspector) return;
this._showOverdrawInspector = enabled;
Expand Down

0 comments on commit 8e23f70

Please sign in to comment.