From 7ffa61583145661e3a579fa2dc50569bc13ba3f6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 21 Oct 2020 11:19:12 +0100 Subject: [PATCH] The `WebGLPipeline.flushLocked` property has been removed. A pipeline can never flush in the middle of a flush anyway, so it was just wasting CPU cycles being set. --- src/renderer/webgl/WebGLPipeline.js | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index 1e6c53e6a..d70ce7f9d 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -15,7 +15,7 @@ var Utils = require('./Utils'); * The `WebGLPipeline` is a base class used by all of the core Phaser pipelines. * * It describes the way elements will be rendered in WebGL. Internally, it handles - * compiling the shaders, creating vertex buffers, assigning primitive topolgy and + * compiling the shaders, creating vertex buffers, assigning primitive topology and * binding vertex attributes, all based on the given configuration data. * * The pipeline is configured by passing in a `WebGLPipelineConfig` object. Please @@ -173,7 +173,7 @@ var WebGLPipeline = new Class({ } /** - * The handle to a WebGL program. + * A reference to the WebGLProgram (shader) that this pipeline is using. * * @name Phaser.Renderer.WebGL.WebGLPipeline#program * @type {WebGLProgram} @@ -220,7 +220,7 @@ var WebGLPipeline = new Class({ this.bytes = new Uint8Array(this.vertexData); /** - * This will store the amount of components of 32 bit length. + * The amount of vertex attribute components of 32 bit length. * * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount * @type {integer} @@ -228,16 +228,6 @@ var WebGLPipeline = new Class({ */ this.vertexComponentCount = Utils.getComponentCount(this.attributes, gl); - /** - * Indicates if the current pipeline is flushing the contents to the GPU. - * When the variable is set the flush function will be locked. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked - * @type {boolean} - * @since 3.1.0 - */ - this.flushLocked = false; - /** * Indicates if the current pipeline is active or not for this frame only. * Reset in the onRender method. @@ -584,10 +574,6 @@ var WebGLPipeline = new Class({ */ flush: function () { - if (this.flushLocked) { return this; } - - this.flushLocked = true; - var gl = this.gl; var vertexCount = this.vertexCount; var topology = this.topology; @@ -595,7 +581,6 @@ var WebGLPipeline = new Class({ if (vertexCount === 0) { - this.flushLocked = false; return; } @@ -603,7 +588,6 @@ var WebGLPipeline = new Class({ gl.drawArrays(topology, 0, vertexCount); this.vertexCount = 0; - this.flushLocked = false; return this; },