Skip to content

Commit cb0861d

Browse files
committed
The canvas created by Phaser.Debug for use when displaying debug data is no longer stored in the CanvasPool, and is instead a stand-alone canvas, free from ever being re-used by another game object.
1 parent 7ebae00 commit cb0861d

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
333333
* Group.getFurthestFrom and Group.getClosestTo has a new optional argument: `callback`. This allows you to apply your own additional filtering to the distance checks, ultimately influencing the selected child (thanks @LoneStranger #2577)
334334
* Text.setText has a new optional argument `immediate` which will re-create the texture immediately upon call, rather than wait for the next render pass to do so (thanks @Scraft #2594)
335335
* Phaser.Utils.pad now calls `toString` on the input given, which means you can pass in common data types, such as numbers, and have them padded and returned as strings.
336+
* The canvas created by Phaser.Debug for use when displaying debug data is no longer stored in the CanvasPool, and is instead a stand-alone canvas, free from ever being re-used by another game object.
337+
* BitmapData has a new, optional, fifth argument: `skipPool`. By default BitmapData objects will ask for the first free canvas found in the CanvasPool, but this behavior can now be customized on a per object basis.
336338

337339
### Bug Fixes
338340

src/input/InputHandler.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,6 @@ Phaser.InputHandler.prototype = {
16541654

16551655
},
16561656

1657-
16581657
/**
16591658
* Bounds Rect check for the sprite drag
16601659
*

src/utils/Debug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Phaser.Utils.Debug.prototype = {
109109
}
110110
else
111111
{
112-
this.bmd = this.game.make.bitmapData(this.game.width, this.game.height);
112+
this.bmd = new Phaser.BitmapData(this.game, '__DEBUG', this.game.width, this.game.height, true);
113113
this.sprite = this.game.make.image(0, 0, this.bmd);
114114
this.game.stage.addChild(this.sprite);
115115

0 commit comments

Comments
 (0)