~rabbits/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH uxn] Fix slowdown in draw-browser/clear

Details
Message ID
<20211129045813.245901-1-delyaerricson@gmail.com>
DKIM signature
pass
Download raw message
Patch: +10 -1
Make the clear routine only clear lines up to the screen width.
This fixes slowdown on wasted clearing of off-screen tiles.

TODO: Only clear/draw lines that will be on the screen.
---
 projects/software/boot.tal | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/projects/software/boot.tal b/projects/software/boot.tal
index 2122d3a..6c3fb7a 100644
--- a/projects/software/boot.tal
+++ b/projects/software/boot.tal
@@ -5,8 +5,10 @@
%++ { ADD2 } %-- { SUB2 } %** { MUL2 } %// { DIV2 }
%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 }

%8// { #03 SFT2 }
%10** { #40 SFT2 } %10// { #04 SFT2 }

%MIN2 { LTH2k JMP SWP2 POP2 }
%MOD { DIVk MUL SUB }
%DEC { #01 - }
%RTN { JMP2r }
@@ -61,6 +63,10 @@
	#0100 .Audio0/length DEO2
	#dd .Audio0/volume DEO ( TODO: turn ON )

	( determine max visible file length )
	.Screen/width DEI2 8// #00ff MIN2 NIP
	;draw-browser/clear-length STA

	( place )
	#0088 .browser/x STZ2
	#0010 .browser/y STZ2
@@ -290,7 +296,10 @@ RTN

	&clear ( -- )
	.Screen/x DEI2k ( Stash the current x pos )
	#ff00

	( Clear the screen )
	( Clear length gets set in init )
	LIT2 &clear-length 00 00
	&clear-loop
		#00 .Screen/sprite DEO
		.Screen/y DEI2k #0008 ++ ROT DEO2
-- 
2.34.0

[uxn/patches/.build.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CG201SUL5OWO.6BS5H6FPQ5GP@cirno>
In-Reply-To
<20211129045813.245901-1-delyaerricson@gmail.com> (view parent)
DKIM signature
missing
Download raw message
uxn/patches/.build.yml: SUCCESS in 54s

[Fix slowdown in draw-browser/clear][0] from [DeltaF1][1]

[0]: https://lists.sr.ht/~rabbits/public-inbox/patches/26930
[1]: delyaerricson@gmail.com

✓ #638106 SUCCESS uxn/patches/.build.yml https://builds.sr.ht/~rabbits/job/638106
Reply to thread Export thread (mbox)