-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce stack usage of LCD_DrawWindowedImageFromFile #585
base: master
Are you sure you want to change the base?
Conversation
Need test on the real TX to see the performance impact. |
we could probably get by instead by assigning the width to 2x the tx screen width (1x on 7e since I think we only support 8-bit images there?) and just validate that the width requested will fit (it should because I think the caller has already validated that? but I didn't check to be sure). That may provide the same stack reduction on the 7e without increasing ROM usage. I really wanted to setup the 7e to only support 2bit images (black, white transmparent), but I could never find a format that was well supported on windows and linux that would work, so I stayed with the 8bit images for them. |
Tested on devo12 and devo8 and didn’t see noticeable performance difference by community member. Someone can help verify as I don’t have any graphics based Tx. |
Despite of the stack usage, i think my implementation is error prone. Even
we have a larger bitmap needs later, we can handle it. And we can trade off
between stack usage and performance easily via tune the buffer size. One
idea here is using temp string as a temp buffer to avoid allocate even one
byte on the stack.
I have some idea to reduce ROM size in this piece of code. Let me try.
PhracturedBlue <[email protected]>于2019年1月14日 周一下午10:10写道:
we could probably get by instead by assigning the width to 2x the tx
screen width (1x on 7e since I think we only support 8-bit images there?)
and just validate that the width requested will fit (it should because I
think the caller has already validated that? but I didn't check to be
sure). That may provide the same stack reduction on the 7e without
increasing ROM usage. I really wanted to setup the 7e to only support 2bit
images (black, white transmparent), but I could never find a format that
was well supported on windows and linux that would work, so I stayed with
the 8bit images for them.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#585 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAuzRI9mwAB0Mx194tvvDQ89knirMfQzks5vDI_ugaJpZM4Z9wXO>
.
--
-Howard
|
d84a505
to
648ada2
Compare
@PhracturedBlue can u help validate this on a real Tx to see the perf? The size increase is small now. |
648ada2
to
dcb5197
Compare
No description provided.