summaryrefslogtreecommitdiffstats
path: root/servers/rendering/renderer_canvas_cull.h
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-12-20 13:19:46 +0100
committerYuri Sizov <yuris@humnom.net>2023-12-20 13:19:46 +0100
commit34ecfff6722be4819707b128ccae561eacf101fc (patch)
tree75aa66e379d17b2c70286deafe124295e3a342e6 /servers/rendering/renderer_canvas_cull.h
parent3ce73e5d419011d1642ed30a3417362b82c41898 (diff)
downloadredot-engine-34ecfff6722be4819707b128ccae561eacf101fc.tar.gz
Avoid crashes when engine leaks canvas items and friends
Diffstat (limited to 'servers/rendering/renderer_canvas_cull.h')
-rw-r--r--servers/rendering/renderer_canvas_cull.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/rendering/renderer_canvas_cull.h b/servers/rendering/renderer_canvas_cull.h
index ba013e667f..9dfa82a3af 100644
--- a/servers/rendering/renderer_canvas_cull.h
+++ b/servers/rendering/renderer_canvas_cull.h
@@ -170,6 +170,9 @@ public:
RID_Owner<Item, true> canvas_item_owner;
RID_Owner<RendererCanvasRender::Light, true> canvas_light_owner;
+ template <class T>
+ void _free_rids(T &p_owner, const char *p_type);
+
bool disable_scale;
bool sdf_used = false;
bool snapping_2d_transforms_to_pixel = false;
@@ -329,6 +332,9 @@ public:
Rect2 _debug_canvas_item_get_rect(RID p_item);
bool free(RID p_rid);
+
+ void finalize();
+
RendererCanvasCull();
~RendererCanvasCull();
};