Skip to content

Commit

Permalink
rebase conclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauren Budorick committed Jun 14, 2018
1 parent c7e8cee commit fa68809
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
14 changes: 7 additions & 7 deletions src/data/program_configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class ConstantBinder<T> implements Binder<T> {
uniform.set(currentValue.constantOr(this.value));
}

getBinding(context: Context, location: WebGLUniformLocation): $Subtype<Uniform<*>> {
getBinding(context: Context, location: WebGLUniformLocation): $Subtype<Uniform<any>> {
return (this.type === 'color') ?
new UniformColor(context, location) :
new Uniform1f(context, location);
Expand Down Expand Up @@ -345,7 +345,7 @@ class CompositeExpressionBinder<T> implements Binder<T> {
*
* @private
*/
class ProgramConfiguration {
export default class ProgramConfiguration {
binders: Array<Binder<any>>;
cacheKey: string;
layoutAttributes: Array<StructArrayMember>;
Expand Down Expand Up @@ -400,9 +400,9 @@ class ProgramConfiguration {
return self;
}

populatePaintArrays(length: number, feature: Feature) {
populatePaintArrays(newLength: number, feature: Feature, index: number) {
for (let i = 0; i < this.binderLen; i++) {
this.binders[i].populatePaintArray(length, feature);
this.binders[i].populatePaintArray(newLength, feature);
}
if (feature.id) {
const featureId = String(feature.id);
Expand All @@ -427,12 +427,12 @@ class ProgramConfiguration {
for (const pos of posArray) {
const feature = vtLayer.feature(pos.index);

for (const property in this.binders) {
const binder = this.binders[property];
for (let i = 0; i < this.binderLen; i++) {
const binder = this.binders[i];
if (binder instanceof ConstantBinder) continue;
if ((binder: any).expression.isStateDependent === true) {
//AHM: Remove after https://github.com/mapbox/mapbox-gl-js/issues/6255
const value = layer.paint.get(property);
const value = layer.paint.get(binder.property);
(binder: any).expression = value.value;
binder.updatePaintArray(pos.start, pos.end, feature, featureState);
dirty = true;
Expand Down
1 change: 1 addition & 0 deletions src/render/draw_line.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import DepthMode from '../gl/depth_mode';
import Texture from './texture';
import {
lineUniformValues,
lineGradientUniformValues,
linePatternUniformValues,
lineSDFUniformValues
} from './program/line_program';
Expand Down
5 changes: 1 addition & 4 deletions src/render/program/fill_extrusion_program.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ import {
UniformMatrix4fv
} from '../uniform_binding';

import glMatrix from '@mapbox/gl-matrix';
const mat3 = glMatrix.mat3;
const vec3 = glMatrix.vec3;
const mat4 = glMatrix.mat4;
import { mat3, vec3, mat4 } from 'gl-matrix';
import { extend } from '../../util/util';

import type Context from '../../gl/context';
Expand Down
2 changes: 1 addition & 1 deletion src/render/program/heatmap_program.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

import { mat4 } from '@mapbox/gl-matrix';
import { mat4 } from 'gl-matrix';

import {
Uniform1i,
Expand Down
2 changes: 1 addition & 1 deletion src/render/program/hillshade_program.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

import { mat4 } from '@mapbox/gl-matrix';
import { mat4 } from 'gl-matrix';

import {
Uniform1i,
Expand Down

0 comments on commit fa68809

Please sign in to comment.