Skip to content

Commit a9471c5

Browse files
cyn0x8FixedData
andcommitted
fix bitmapfilter mem leak
Co-Authored-By: data5 <[email protected]>
1 parent f6a98e3 commit a9471c5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

flixel/FlxCamera.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ class FlxCamera extends FlxBasic
16601660
* @param Color The color to fill with in `0xAARRGGBB` hex format.
16611661
* @param BlendAlpha Whether to blend the alpha value or just wipe the previous contents. Default is `true`.
16621662
*/
1663-
public function fill(Color:FlxColor, BlendAlpha:Bool = true, FxAlpha:Float = 1.0, ?graphics:Graphics):Void
1663+
public function fill(Color:FlxColor, BlendAlpha:Bool = true, FxAlpha:Float = 1.0, ?graphics:Graphics, force:Bool = false):Void
16641664
{
16651665
if (FlxG.renderBlit)
16661666
{
@@ -1676,7 +1676,7 @@ class FlxCamera extends FlxBasic
16761676
}
16771677
else
16781678
{
1679-
if (FxAlpha == 0)
1679+
if (FxAlpha == 0 && !force)
16801680
return;
16811681

16821682
final targetGraphics = (graphics == null) ? canvas.graphics : graphics;

flixel/system/frontEnds/CameraFrontEnd.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ class CameraFrontEnd
289289
}
290290
else
291291
{
292-
camera.fill(camera.bgColor.rgb, camera.useBgAlphaBlending, camera.bgColor.alphaFloat);
292+
camera.fill(camera.bgColor.rgb, camera.useBgAlphaBlending, camera.bgColor.alphaFloat, null, camera.filtersEnabled && camera.filters?.length ?? 0 > 0);
293293
}
294294
}
295295
}

0 commit comments

Comments
 (0)