Skip to content

Commit

Permalink
Fix memory leak when applying image effects
Browse files Browse the repository at this point in the history
  • Loading branch information
OverloadedOrama committed Nov 10, 2023
1 parent 39c88ce commit 7235617
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/UI/Dialogs/ImageEffects/DesaturateDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func commit_action(cel: Image, project: Project = Global.current_project) -> voi
else:
var gen := ShaderImageEffect.new()
gen.generate_image(cel, shader, params, project.size)
yield(gen, "done")


func _on_RButton_toggled(button_pressed: bool) -> void:
Expand Down
1 change: 0 additions & 1 deletion src/UI/Dialogs/ImageEffects/DropShadowDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func commit_action(cel: Image, project: Project = Global.current_project) -> voi
else:
var gen := ShaderImageEffect.new()
gen.generate_image(cel, shader, params, project.size)
yield(gen, "done")


func _on_OffsetSliders_value_changed(_value: Vector2) -> void:
Expand Down
1 change: 0 additions & 1 deletion src/UI/Dialogs/ImageEffects/GradientDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ func commit_action(cel: Image, project: Project = Global.current_project) -> voi
else:
var gen := ShaderImageEffect.new()
gen.generate_image(cel, shader, params, project.size)
yield(gen, "done")


func _on_ShapeOptionButton_item_selected(index: int) -> void:
Expand Down
1 change: 0 additions & 1 deletion src/UI/Dialogs/ImageEffects/GradientMapDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ func commit_action(cel: Image, project: Project = Global.current_project) -> voi
else:
var gen := ShaderImageEffect.new()
gen.generate_image(cel, shader, params, project.size)
yield(gen, "done")


func _on_GradientEdit_updated(_gradient, _cc) -> void:
Expand Down
1 change: 0 additions & 1 deletion src/UI/Dialogs/ImageEffects/HSVDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func commit_action(cel: Image, project: Project = Global.current_project) -> voi
else:
var gen := ShaderImageEffect.new()
gen.generate_image(cel, shader, params, project.size)
yield(gen, "done")


func _reset() -> void:
Expand Down
1 change: 0 additions & 1 deletion src/UI/Dialogs/ImageEffects/InvertColorsDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func commit_action(cel: Image, project: Project = Global.current_project) -> voi
else:
var gen := ShaderImageEffect.new()
gen.generate_image(cel, shader, params, project.size)
yield(gen, "done")


func _on_RButton_toggled(button_pressed: bool) -> void:
Expand Down
1 change: 0 additions & 1 deletion src/UI/Dialogs/ImageEffects/OffsetImage.gd
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func commit_action(cel: Image, project: Project = Global.current_project) -> voi
else:
var gen := ShaderImageEffect.new()
gen.generate_image(cel, shader, params, project.size)
yield(gen, "done")


func _on_OffsetSliders_value_changed(_value: Vector2) -> void:
Expand Down
1 change: 0 additions & 1 deletion src/UI/Dialogs/ImageEffects/OutlineDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func commit_action(cel: Image, project: Project = Global.current_project) -> voi
else:
var gen := ShaderImageEffect.new()
gen.generate_image(cel, shader, params, project.size)
yield(gen, "done")


func _on_ThickValue_value_changed(value: int) -> void:
Expand Down
1 change: 0 additions & 1 deletion src/UI/Dialogs/ImageEffects/Posterize.gd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func commit_action(cel: Image, project: Project = Global.current_project) -> voi
else:
var gen := ShaderImageEffect.new()
gen.generate_image(cel, shader, params, project.size)
yield(gen, "done")


func _on_LevelsSlider_value_changed(value: float) -> void:
Expand Down
4 changes: 0 additions & 4 deletions src/UI/Dialogs/ImageEffects/RotateImage.gd
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ func commit_action(cel: Image, _project: Project = Global.current_project) -> vo
else:
var gen := ShaderImageEffect.new()
gen.generate_image(cel, rotxel_shader, params, _project.size)
yield(gen, "done")

CLEANEDGE:
var params := {
Expand All @@ -147,7 +146,6 @@ func commit_action(cel: Image, _project: Project = Global.current_project) -> vo
params["preview"] = false
var gen := ShaderImageEffect.new()
gen.generate_image(cel, DrawingAlgos.clean_edge_shader, params, _project.size)
yield(gen, "done")
OMNISCALE:
var params := {
"angle": angle,
Expand All @@ -163,7 +161,6 @@ func commit_action(cel: Image, _project: Project = Global.current_project) -> vo
params["preview"] = false
var gen := ShaderImageEffect.new()
gen.generate_image(cel, DrawingAlgos.omniscale_shader, params, _project.size)
yield(gen, "done")
NNS:
var params := {
"angle": angle,
Expand All @@ -177,7 +174,6 @@ func commit_action(cel: Image, _project: Project = Global.current_project) -> vo
else:
var gen := ShaderImageEffect.new()
gen.generate_image(cel, nn_shader, params, _project.size)
yield(gen, "done")
ROTXEL:
DrawingAlgos.rotxel(image, angle, pivot)
NN:
Expand Down
1 change: 0 additions & 1 deletion src/UI/Dialogs/ImageEffects/ShaderEffect.gd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func commit_action(cel: Image, project: Project = Global.current_project) -> voi
var gen := ShaderImageEffect.new()
gen.generate_image(cel, shader, params, project.size)
selected_cels.unlock()
yield(gen, "done")


func _on_ChooseShader_pressed() -> void:
Expand Down

0 comments on commit 7235617

Please sign in to comment.