-
Notifications
You must be signed in to change notification settings - Fork 19
Refactored TranslationManipulator::PreviewBitmap #678
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
Conversation
ScaleManipulator::PreviewBitmap works to make it work properly when ImageView is fixed. Basicaly makes updated region simpler.
to match how ScaleManipulator::PreviewBitmap works to make it work properly when ImageView is fixed. Basicaly makes updated region simpler.
to match how ScaleManipulator::PreviewBitmap works to make it work properly when ImageView is fixed. Basicaly makes updated region simpler.
to match how ScaleManipulator::PreviewBitmap works to make it work properly when ImageView is fixed. Basicaly makes updated region simpler.
to match how ScaleManipulator::PreviewBitmap works to make it work properly when ImageView is fixed. Basicaly makes updated region simpler.
to match how ScaleManipulator::PreviewBitmap works to make it work properly when ImageView is fixed. Basicaly makes updated region simpler.
|
I pushed a change that might fix what you see. it is soemthing I changed to try to fix my artifact but might cause yours. |
|
Hold on... |
|
BTW, had this crash on quit after playing around for a bit: No idea if it could be related to this change. |
|
ok that artifact is more like what i see but the crash log link just goes back to this page. i think the file is missing |
|
also i know its related to this last_calculated_resolution stuff that scale doesnt have. if i set it to 1 all the time instead of calculating then there are no artifacts but i didnt want to remove that. i think it must make the math off somehow |
|
ok I still see random artifacts but I think its a lot better and more rare. can you please try the latest? |
|
First trying to upload that report again: Then: Well done, those border artifact is gone! I also haven't yet seen that artifact your reported before. Translating does feel a bit less smooth that on master. Only really noticable with my big 8k image. |
|
thanks for testing and i dont think that crash is related to this change |
|
ok i did a few minor performance type things - i found some values calculated 2x so i removed them and also avoid calculating y values every time thru the x loop. i dont know if you can tell any difference |
|
Can't say I see a change in performance. Maybe some more improvements can be found in the future... BTW, is the commit message detailed enough to give future devs an idea when they have a look at the change down the road? No real programmer myself, so I can't judge that. :) |
I dont know maybe i can add some comments to the code. next i have to rework selection so that might be scarier and then the rework of imageview for the checker bg might be scary too overall artpaint code can be difficult in places! |
|
WRT the performance issue, I noticed that CPU cycles are burnt as long as that mouse button is pressed. While pressing the mouse button, the selection is shown with a reduced resolution. Maybe this computation runs more often than needed? To see this:
|
|
hold on i might be crazy but this pr might not be needed after all? testing with the checker bg branch more and not seeing the issues I saw before so if i cant repro it i will just close this pr. confused rn selection toll still needs work however |
|
This PR doesnt seem to be needed so closing for now but will keep the branch in case its needed later |




Refactored TranslationManipulator::PreviewBitmap to match how ScaleManipulator::PreviewBitmap works to make it work properly when ImageView is fixed. Basicaly makes updated region simpler.
i am reworking the checker bg to work properly with Haiku invalidate/draw/etc and in my branch TranslationManipulator doesn't work properly but with this fix it does. it should work exactly as before (but maybe better performance?) this isnt a feature change just a refactor.
I sometimes see little artifacts with a large selection and large image but i can't get it to happen regularly to debug it. it is only temporary and goes away when you click ok or cancel. let me know if it is bad or can figure out how to make it happen regularly but i have spent a while trying to fix it but not even sure why/when it happens. seems somehow related to moving off the edge of the image but its pretty rare?