Skip to content

Commit e4b1093

Browse files
committed
The WebGLRenderer.resize and onResize methods no longer receives or uses the resolution parameter.
1 parent 67e49b5 commit e4b1093

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

src/renderer/webgl/WebGLRenderer.js

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ var WebGLRenderer = new Class({
7676
antialias: gameConfig.antialias,
7777
backgroundColor: gameConfig.backgroundColor,
7878
contextCreation: contextCreationConfig,
79-
resolution: gameConfig.resolution,
8079
roundPixels: gameConfig.roundPixels,
8180
maxTextures: gameConfig.maxTextures,
8281
maxTextureSize: gameConfig.maxTextureSize,
@@ -843,7 +842,7 @@ var WebGLRenderer = new Class({
843842

844843
var baseSize = game.scale.baseSize;
845844

846-
this.resize(baseSize.width, baseSize.height, game.scale.resolution);
845+
this.resize(baseSize.width, baseSize.height);
847846
},
848847

849848
/**
@@ -853,16 +852,14 @@ var WebGLRenderer = new Class({
853852
* @since 3.16.0
854853
*
855854
* @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions.
856-
* @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.
857-
* @param {Phaser.Structs.Size} displaySize - The display Size object. The size of the canvas style width / height attributes.
858-
* @param {number} [resolution] - The Scale Manager resolution setting.
855+
* @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions. The canvas width / height values match this.
859856
*/
860-
onResize: function (gameSize, baseSize, displaySize, resolution)
857+
onResize: function (gameSize, baseSize)
861858
{
862859
// Has the underlying canvas size changed?
863-
if (baseSize.width !== this.width || baseSize.height !== this.height || resolution !== this.resolution)
860+
if (baseSize.width !== this.width || baseSize.height !== this.height)
864861
{
865-
this.resize(baseSize.width, baseSize.height, resolution);
862+
this.resize(baseSize.width, baseSize.height);
866863
}
867864
},
868865

@@ -874,21 +871,19 @@ var WebGLRenderer = new Class({
874871
*
875872
* @param {number} [width] - The new width of the renderer.
876873
* @param {number} [height] - The new height of the renderer.
877-
* @param {number} [resolution] - The new resolution of the renderer.
878874
*
879875
* @return {this} This WebGLRenderer instance.
880876
*/
881-
resize: function (width, height, resolution)
877+
resize: function (width, height)
882878
{
883879
var gl = this.gl;
884880

885881
this.width = width;
886882
this.height = height;
887-
this.resolution = resolution;
888883

889884
gl.viewport(0, 0, width, height);
890885

891-
this.pipelines.resize(width, height, resolution);
886+
this.pipelines.resize(width, height);
892887

893888
this.drawingBufferHeight = gl.drawingBufferHeight;
894889

0 commit comments

Comments
 (0)