Don't create useless temporary variables
This commit is contained in:
@@ -196,9 +196,7 @@ WebGLCircleReplay.prototype.getDeleteResourcesFunction = function(context) {
|
||||
*/
|
||||
WebGLCircleReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
|
||||
// get the program
|
||||
const fragmentShader = fragment;
|
||||
const vertexShader = vertex;
|
||||
const program = context.getProgram(fragmentShader, vertexShader);
|
||||
const program = context.getProgram(fragment, vertex);
|
||||
|
||||
// get the locations
|
||||
let locations;
|
||||
|
||||
@@ -439,9 +439,7 @@ WebGLLineStringReplay.prototype.getDeleteResourcesFunction = function(context) {
|
||||
*/
|
||||
WebGLLineStringReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
|
||||
// get the program
|
||||
const fragmentShader = fragment;
|
||||
const vertexShader = vertex;
|
||||
const program = context.getProgram(fragmentShader, vertexShader);
|
||||
const program = context.getProgram(fragment, vertex);
|
||||
|
||||
// get the locations
|
||||
let locations;
|
||||
|
||||
@@ -873,9 +873,7 @@ WebGLPolygonReplay.prototype.getDeleteResourcesFunction = function(context) {
|
||||
*/
|
||||
WebGLPolygonReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
|
||||
// get the program
|
||||
const fragmentShader = fragment;
|
||||
const vertexShader = vertex;
|
||||
const program = context.getProgram(fragmentShader, vertexShader);
|
||||
const program = context.getProgram(fragment, vertex);
|
||||
|
||||
// get the locations
|
||||
let locations;
|
||||
|
||||
@@ -271,9 +271,7 @@ WebGLTextureReplay.prototype.createTextures = function(textures, images, texture
|
||||
*/
|
||||
WebGLTextureReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
|
||||
// get the program
|
||||
const fragmentShader = fragment;
|
||||
const vertexShader = vertex;
|
||||
const program = context.getProgram(fragmentShader, vertexShader);
|
||||
const program = context.getProgram(fragment, vertex);
|
||||
|
||||
// get the locations
|
||||
let locations;
|
||||
|
||||
@@ -148,10 +148,7 @@ WebGLLayerRenderer.prototype.composeFrame = function(frameState, layerState, con
|
||||
|
||||
const gl = context.getGL();
|
||||
|
||||
const fragmentShader = fragment;
|
||||
const vertexShader = vertex;
|
||||
|
||||
const program = context.getProgram(fragmentShader, vertexShader);
|
||||
const program = context.getProgram(fragment, vertex);
|
||||
|
||||
let locations;
|
||||
if (!this.defaultLocations_) {
|
||||
|
||||
Reference in New Issue
Block a user