about summary refs log tree commit diff stats
path: root/app.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-04-01 16:38:22 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-04-01 18:12:29 -0700
commitf64f680f2b4361cece5e8746a870f986473ca502 (patch)
treef9187930631d93aff59ad9884a4482f43dc41223 /app.lua
parent876d6298b40fc8b00bf559d4ec2d909ab1e6bc80 (diff)
downloadlines.love-f64f680f2b4361cece5e8746a870f986473ca502.tar.gz
no more Text allocations
Is it just my imagination, or does the app feel lighter and more fluffy?
Diffstat (limited to 'app.lua')
-rw-r--r--app.lua9
1 files changed, 0 insertions, 9 deletions
diff --git a/app.lua b/app.lua
index 48ab363..f5e114d 100644
--- a/app.lua
+++ b/app.lua
@@ -210,14 +210,6 @@ function App.wait_fake_time(t)
   App.time = App.time + t
 end
 
--- LÖVE's Text primitive retains no trace of the string it was created from,
--- so we'll wrap it for our tests.
---
--- This implies that we need to hook any operations we need on Text objects.
-function App.newText(font, s)
-  return {type='text', data=s, text=love.graphics.newText(font, s)}
-end
-
 function App.width(text)
   return love.graphics.getFont():getWidth(text)
 end
@@ -423,7 +415,6 @@ function App.disable_tests()
   App.screen.move = love.window.setPosition
   App.screen.position = love.window.getPosition
   App.screen.print = love.graphics.print
-  App.newText = love.graphics.newText
   App.screen.draw = love.graphics.draw
   if Current_app == nil or Current_app == 'run' then
     App.open_for_reading = function(filename) return io.open(filename, 'r') end