-
Notifications
You must be signed in to change notification settings - Fork 45
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
yaft always redraws the whole line across the screen, even in tmux #29
Comments
Yes, yaft always redraw whole line at a time. It's expected behavior. for example, 2x2 screen resolution, you can see pixels on screen like this:
In memory, these pixels are allocated on a line.
If pixel1 and pixel3 are dirty and we need to redraw two pixels.
Usually method1 is more efficient (If there are many rendering panes) and more simple implementation.
yaft knows which lines are dirty and needed to redraw If yaft is the only program that draw to framebuffer. Normally rendering collision or rendering priority is handled by display server. But there is no such program in framebuffer. |
Many thanks for the detailed explanations. After taking a look at the corresponding places in the code, I am slowly getting a better understanding of how does yaft work. Supposed we will keep the current model of whole line drawing, one possible solution would be adding another image buffer in addition to fb->wall? Let's call it fb->graphics for now. Then slightly modify idump so that it will load the image, convert it to the format suitable for framebuffer, but write to fb->graphics in yaft instead of its own instance of fb->fp. When yaft redraws the line, let it selectively copy the pixel from fb->wall or fb-graphics, depending on the current col and line. I am now trying to implement the above mentioned stuffs. One principle question I have is inter process communication. How should idump, as a seperate process, elegantly pass the address of the image buffer to yaft? For obvious reasons, I don't want to throw everything into one "feature-rich" program ... If you already see something conceptually flawed, or have better ideas, or know something which I should definitely take a look at, please tell me. Thank you. |
Maybe shared memory is the simplest choice. suggested workflow:
But I don't reccomend.
In my opinion, collision detection is not terminal's job. Terminal is not display server (like Xorg server). yaft and idump is not only program that access to framebuffer. Above-mentioned solution is not suitable for general-purpose. workarounds:
|
I tried sdump, the static version. It works in yaft, but not at all when tmux is running. sdump just quietly exit without showing anything. Anyway, I have one question concerning how yaft and sixel work together. Where and when do you update Being able to understand those mechanisms would be very helpful for me to try out some stuffs I have in mind. I would like to do something like this:
Not a general purpose solution, but that's what I can think of at the moment and would like to try out.
Just a thought. How difficult is it to make a 'framebuffer multiplexer'? For instance, if we have 10 layers of virtual framebuffers, I assume such program already exists? |
All terminal multiplexers are lack of sixel integration. Because sixel sequence is complicated and a few people need this feature. Here is tmux fork that support sixel integration (I haven't test yet). tmux never support sixel by itself. GNU screen doesn't support sixel too, but pass through sixel sequence with
What you need to do is to specify pseudo terminal for output when you use As I mentioned above, I recommend to use GNU screen.
I don't know your approach is worth or not, but it seems to reinvent the wheel. In my thoughts, what we need in framebuffer environment is not an another display server but terminal multiplexer. Current terminal multiplexers only have less capability of supporting unusual terminal features (not only sixel, there are many other features that rarely used but noticeable)
Only a few project I know:
|
I'm implementing image preview for rover file browser using idump, want to run the whole thing in yaft + tmux. But it seems that yaft always tries to redraw the whole line, which also affects the image pane. A screenshot saves a thousand words, and here is the screencast.
https://vimeo.com/268868152
But I also notice that such cross pane interference only occurs when I idump some images. Normally, everything runs perfectly alright in yaft + tmux, each pane will refresh individually. Also, Linux console doesn't have this behavior.
Is it actually a bug, or it is a limitation of the current implementation?
Thank you.
The text was updated successfully, but these errors were encountered: