Reducce cpu usage by not using clip_to for each and every element

This commit is contained in:
2021-12-03 15:33:32 -06:00
parent 6cf4cd73dd
commit 35ad687d4c

View File

@@ -284,10 +284,8 @@ module CyberarmEngine
@style.background_nine_slice_canvas.draw
@style.border_canvas.draw
Gosu.clip_to(@x, @y, width, height) do
render
end
end
def debug_draw
return if defined?(GUI_DEBUG_ONLY_ELEMENT) && self.class == GUI_DEBUG_ONLY_ELEMENT