 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Hacker
Joined: 10 Jun 2006 Posts: 65 Location: Bratislava, Slovakia
|
Posted: Thu Oct 12, 2006 9:06 pm Post subject: holomind |
|
|
holomind,
Great! 1.00 is nice and fast!
Quality 4 indeed looks best.
A few questions:
- what exactly does quality 2 do? It looks terrible, much worse than 1 (the content of the windows is somehow too white).
- the active window animates to a smaller size. When it reaches the size, it is again redrawn - why? It seems the quality is better without the redraw.
- when is later_quality redrawn? Because waiting for later_quality is much slower than setting it to the same value as first_quality (4->4: 1,6s; 1->4: 2,3s)
Suggestion:
- could the active window (the one that animates) not be drawn on the background initially? Because now it animates "onto itself". IMO it would look nicer if it animated into black space. I hope you understand.
TIA
Roman |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Thu Oct 12, 2006 10:41 pm Post subject: Re: holomind |
|
|
| Hacker wrote: | holomind,
Great! 1.00 is nice and fast!
Quality 4 indeed looks best.
|
:=)
| Quote: |
A few questions:
- what exactly does quality 2 do? It looks terrible, much worse than 1 (the content of the windows is somehow too white).
|
seems to be some sort of xor, inverting etc., a full list of the contstants is here:
http://www.adaptiveintelligence.net/Developers/Reference/Win32API/GDIConstants.aspx
| Code: | /* StretchBlt() Modes */
public const int BLACKONWHITE = 1;
public const int WHITEONBLACK = 2;
public const int COLORONCOLOR = 3;
public const int HALFTONE = 4;
public const int MAXSTRETCHBLTMODE= 4; |
| Quote: | - the active window animates to a smaller size. When it reaches the size, it is again redrawn -
why? It seems the quality is better without the redraw. |
normally the moving window is drawn with quality:3 or 1 and needs to be drawn again at full quality in the end (:4). perhaps this is still some old function, now it only should change quality if zoom==0, means last frame of animation. then no further draw would be needed.
| Quote: | | - when is later_quality redrawn? Because waiting for later_quality is much slower than setting it to the same value as first_quality (4->4: 1,6s; 1->4: 2,3s) |
the live-repaint draws with "later_quality" and the normal paint (first round) with first_quality. but i guess i have elimintated first-round because it was to slow for you. this means you only have the animation in, and then the liverepaint.
there is some function to only set blitmode to 4 if it is different from last bltmode, seems it needs some time to change the modes ? i dont understand it fully, one would need to test each function (dll-calls) and mesure their times to detect the slow parts. (eg. printwindow() is not too bad as i suspected earlier, actually strechblt has a much bigger impact on speed. strechblit with q:1 vs. q:4 can be noticed easily.
| Quote: | Suggestion:
- could the active window (the one that animates) not be drawn on the background initially? Because now it animates "onto itself". IMO it would look nicer if it animated into black space. I hope you understand. |
hmm, i had this effect in the beginning, but if you animate out then the window is "detached" from the background leaving a black space. as i like the animations to be "symetrical" the animate in "pops" into the black space. otherwise you have the animated window twice. this can be easily tweaked in the animate_in function, playing with the parameters and if zoom etc. |
|
| Back to top |
|
 |
Hacker
Joined: 10 Jun 2006 Posts: 65 Location: Bratislava, Slovakia
|
Posted: Thu Oct 12, 2006 11:14 pm Post subject: |
|
|
holomind,
| Quote: | | the live-repaint draws with "later_quality" |
Hm, perhaps live-repaint should be called immediately after the animation finishes? (Or is it and my system is just too slow?)
| Quote: | | i had this effect in the beginning, but if you animate out then the window is "detached" from the background leaving a black space |
Is that bad?
Roman |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Fri Oct 13, 2006 5:26 am Post subject: |
|
|
new version 1.01, with desktop image and some code changes (better variables, some indenting) the code is too long anyways so no chance to fit on one page. keymapping is moved to top of script so it can be changed in a config gui easily. also the Window_Hidden() is on top so people see why windows are gone
perhaps the script is a bit slower because of painting the desktopimage.
the repaint is optimized and only thumbnails are redrawn, seldom a full refresh.
small windows are only maximized to their real size and not zoomed.
ps. you can always access old versions from 1.00 on in wiki. see links in #1st post. |
|
| Back to top |
|
 |
Hacker
Joined: 10 Jun 2006 Posts: 65 Location: Bratislava, Slovakia
|
Posted: Fri Oct 13, 2006 11:20 am Post subject: |
|
|
holomind,
Updated to 1.01b in wiki (removed some hotkey, ifwinactives, as hotkey, ifwinactive is valid for all following hotkeys until overridden by another hotkey, ifwinactive).
How do I turn off the desktop image?
Roman |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Fri Oct 13, 2006 11:30 am Post subject: |
|
|
| Hacker wrote: | holomind,
Updated to 1.01b in wiki (removed some hotkey, ifwinactives, as hotkey, ifwinactive is valid for all following hotkeys until overridden by another hotkey, ifwinactive).
|
ok, didnt know the exact syntax, the command-referece was not clear at that point
| Quote: | How do I turn off the desktop image?  |
i dont know you can simply comment the gui show before the paintdesktop, or simply the paintdesktop then you will get a black DC instead of your desktop image. the code now relies on painting in the desktop instead fo making the regions black x...42, i think there should not be a big difference between bitblt the desktop hdc or with black pixels.... |
|
| Back to top |
|
 |
not-logged-in-daonlyfreez Guest
|
Posted: Fri Oct 13, 2006 1:04 pm Post subject: |
|
|
Excellent!
Fast and slick... |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4065 Location: Pittsburgh
|
Posted: Fri Oct 13, 2006 4:33 pm Post subject: |
|
|
Version 1.01b is nice and fast, but
- At the first invocation it only showed 4 of my 9 open windows. I have to visit them one by one, otherwise they don't show up even later.
- I opened up a 10th window, and the now unused two fields in the Expose window are not cleared, they show portions of the previous, larger thumbnails. |
|
| Back to top |
|
 |
SoggyDog
Joined: 02 May 2006 Posts: 261 Location: Greeley, CO
|
Posted: Fri Oct 13, 2006 5:09 pm Post subject: |
|
|
| Laszlo wrote: | Version 1.01b is nice and fast, but
- At the first invocation it only showed 4 of my 9 open windows. I have to visit them one by one, otherwise they don't show up even later.
- I opened up a 10th window, and the now unused two fields in the Expose window are not cleared, they show portions of the previous, larger thumbnails. |
Same results here, plus I think I liked it better in earlier versions when the thumbs were
generated and placed before the GUI came up. As it is now, the GUI opens and the thumbs
sort of "pop" in to place one by one.
Was this done for speed? Since this thread has gotten so long,
I've kinda lost track of what's been done and why. _________________
SoggyDog
Download AutoHotKey Wallpaper
Does 'Fuzzy Logic' tickle? |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3644 Location: Belgrade
|
Posted: Fri Oct 13, 2006 5:45 pm Post subject: |
|
|
yeah... when everybody is maintaining its own code, things like that happen.... _________________
 |
|
| Back to top |
|
 |
Hacker
Joined: 10 Jun 2006 Posts: 65 Location: Bratislava, Slovakia
|
Posted: Fri Oct 13, 2006 7:32 pm Post subject: |
|
|
holomind,
Well, it subjectively feels faster in version 1.00 (wait and then show everything fast, instead of slowly build up the thumbnails), so I am going back to 1.00 for now.
Commenting out painting the background image indeed did not help.
majkinetor,
Well I am (we are) patiently waiting for your version.
Roman |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Sun Oct 15, 2006 7:01 pm Post subject: |
|
|
some comments to the last posts:
@lazlo: seems to be an issue due to the optimization, some slots are not cleared correctly. it only clears the remaining slots if the number of windows gets smaller. if it gets bigger they should be cleared automatically.
things can be optimized here. we could also have a full refresh every 10 times but normally it should work only clearing the "garbage"
should be faster than clearing all and then painting again.
this is mainly done so thumbnails can be refreshed one by one and no wait for all windows painted.
@hacker: hmm thats funny. i guess the introduction of painting the background (=4th buffer) can have some impact, also the way of painting is changed slighly. we would need to messure exact times to find the slow places.
in my opinion it was faster watching windows drawing (as its now) and not to wait until its completely drawn in backbuffer (like before). the delay of click and viewing something is now minimal. but having paint in backbuffer and then show them at once looks more "smooth/solid".
also some parameters for quality of strechblt are changed but should be fast anyways. everybody is welcome to give tipps for improving speed.
having drawn all images in background at once would also remove the artefacts of garbage slots, as i would simply clear it completely as all windows are drawn anyways.
one nice effect for speeding up the liverepaint could be to only refresh the thumb where the mouse is hovering, and the others only once in 10seconds.
@majkinetor: its time for you to put some of your modifications into wiki  |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Sun Oct 15, 2006 9:06 pm Post subject: |
|
|
some small updates , see version 1.02 in wiki. (post #1 not updated)
* Desktopimage can be disabled (show_desktop_image=0)
* full backbuffer repaint again, garbage-collector removed
* added missing deletedc for desktop-buffer. |
|
| Back to top |
|
 |
Hacker
Joined: 10 Jun 2006 Posts: 65 Location: Bratislava, Slovakia
|
Posted: Sun Oct 15, 2006 9:43 pm Post subject: |
|
|
holomind,
Thanks for the new version, but the animation is terribly slow... more than one second!
If you wish to get some more precise timings, perhaps you could add some | Code: | | FileAppend, %SomeCalculatedTime%, expose.log | commands.
Roman |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Sun Oct 15, 2006 9:54 pm Post subject: |
|
|
| Hacker wrote: | holomind,
Thanks for the new version, but the animation is terribly slow... more than one second!
If you wish to get some more precise timings, perhaps you could add some FileAppend, %SomeCalculatedTime%, expose.log commands.
Roman |
as i said, you either get quick response and watch windows "popping" up, or you "wait" for the backbuffer to complete not my fault ... there is no way to cheat your slow cpu
i really dont understand, on my laptop (1,4ghz / 1gig ram shared memory gfx) i get nearly instant visible of windows. only 5 frames is to quick, and i even dont get a smooth animation.
as the frontbuffer stays until the backbuffer is finished you have your "last" image immediately.
perhaps your pc has not enough gfx-memory and the 4 hdc-buffers are too much ? take your x * y * deepth * 4 ??
i start to experiment with directx, for some speed improvement (but printwindow() wont be faster) compiling some directx functions into a dll which then can be called from ahk. ... (btw. i hate compilers all this nonsense headers and includes etc. b*llsh*t if you are used to php or even ahk where you simply "use" your functions and dont care about where it comes from. c++ and ms-tools in general are either so complicated or soo bloatware. the idea is to covert the com into a dll with callable functions.
@hacker could you give some more details which parts are too slow for you and not not only "animation" what happens if you set animationstep to 1 ? (means skipping animation nearly) do you still have to wait (as printwindow paints your windows) or is your problem moving (scaling the front window into the thumbnail-view)...
what are your pc specs ? cpu/ram/gfx-card ? |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|