Skip to content

Commit 90219d4

Browse files
committed
Removed all references to the FlatTintPipeline.
1 parent 5dbd759 commit 90219d4

2 files changed

Lines changed: 11 additions & 21 deletions

File tree

src/renderer/webgl/WebGLRenderer.js

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ var WebGLSnapshot = require('../snapshot/WebGLSnapshot');
1414

1515
// Default Pipelines
1616
var BitmapMaskPipeline = require('./pipelines/BitmapMaskPipeline');
17-
var FlatTintPipeline = require('./pipelines/FlatTintPipeline');
1817
var ForwardDiffuseLightPipeline = require('./pipelines/ForwardDiffuseLightPipeline');
1918
var TextureTintPipeline = require('./pipelines/TextureTintPipeline');
2019

@@ -512,7 +511,6 @@ var WebGLRenderer = new Class({
512511
this.pipelines = {};
513512

514513
this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: this.game, renderer: this }));
515-
this.addPipeline('FlatTintPipeline', new FlatTintPipeline({ game: this.game, renderer: this }));
516514
this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: this.game, renderer: this }));
517515
this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: this.game, renderer: this }));
518516

@@ -540,7 +538,7 @@ var WebGLRenderer = new Class({
540538

541539
var blank = this.game.textures.getFrame('__DEFAULT');
542540

543-
this.pipelines.FlatTintPipeline.currentFrame = blank;
541+
this.pipelines.TextureTintPipeline.currentFrame = blank;
544542

545543
this.blankTexture = blank;
546544
},
@@ -1506,18 +1504,13 @@ var WebGLRenderer = new Class({
15061504
if (camera.backgroundColor.alphaGL > 0)
15071505
{
15081506
var color = camera.backgroundColor;
1509-
var FlatTintPipeline = this.pipelines.FlatTintPipeline;
1507+
var TextureTintPipeline = this.pipelines.TextureTintPipeline;
15101508

1511-
FlatTintPipeline.batchFillRect(
1512-
0, 0, 1, 1, 0,
1509+
TextureTintPipeline.drawFillRect(
15131510
cx, cy, cw, ch,
15141511
Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1.0),
1515-
color.alphaGL,
1516-
1, 0, 0, 1, 0, 0,
1517-
[ 1, 0, 0, 1, 0, 0 ]
1512+
color.alphaGL
15181513
);
1519-
1520-
FlatTintPipeline.flush();
15211514
}
15221515
},
15231516

@@ -1532,15 +1525,10 @@ var WebGLRenderer = new Class({
15321525
*/
15331526
postRenderCamera: function (camera)
15341527
{
1535-
var FlatTintPipeline = this.pipelines.FlatTintPipeline;
1536-
1537-
var isFlashing = camera.flashEffect.postRenderWebGL(FlatTintPipeline, Utils.getTintFromFloats);
1538-
var isFading = camera.fadeEffect.postRenderWebGL(FlatTintPipeline, Utils.getTintFromFloats);
1528+
var TextureTintPipeline = this.pipelines.TextureTintPipeline;
15391529

1540-
if (isFading || isFlashing)
1541-
{
1542-
FlatTintPipeline.flush();
1543-
}
1530+
camera.flashEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats);
1531+
camera.fadeEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats);
15441532

15451533
camera.dirty = false;
15461534

@@ -1573,6 +1561,8 @@ var WebGLRenderer = new Class({
15731561
{
15741562
pipelines[key].onPreRender();
15751563
}
1564+
1565+
this.setPipeline(this.pipelines.TextureTintPipeline);
15761566
},
15771567

15781568
/**
@@ -1629,7 +1619,6 @@ var WebGLRenderer = new Class({
16291619
}
16301620
}
16311621

1632-
this.flush();
16331622
this.setBlendMode(CONST.BlendModes.NORMAL);
16341623

16351624
// Applies camera effects and pops the scissor, if set
@@ -1646,6 +1635,8 @@ var WebGLRenderer = new Class({
16461635
{
16471636
if (this.contextLost) { return; }
16481637

1638+
this.flush();
1639+
16491640
// Unbind custom framebuffer here
16501641

16511642
if (this.snapshotState.callback)

src/renderer/webgl/pipelines/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
module.exports = {
1212

1313
BitmapMaskPipeline: require('./BitmapMaskPipeline'),
14-
FlatTintPipeline: require('./FlatTintPipeline'),
1514
ForwardDiffuseLightPipeline: require('./ForwardDiffuseLightPipeline'),
1615
TextureTintPipeline: require('./TextureTintPipeline')
1716

0 commit comments

Comments
 (0)