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.

This commit is contained in:
Richard Davey 2020-10-21 11:19:12 +01:00
parent 6ed84e2f34
commit 7ffa615831

View file

@ -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;
},