Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvement: Change fading mechanism
- Change fading mechanism for better modularity. Remove fade queue and use members in struct _win to record fading data. In contrast to previous commits, this one actually could make the program slower (but very slightly, hardly noticeable if your CPU is anywhere close to AMD K7). As this commit changes lots of things, bugs are to be expected. - Currently -F does not do its job. -f actually equals -fF. (While in the past -F equals nothing and -f is just -f.) A fix will be made soon. I suppose it isn't hard. - Add a preprocessor function paint_preprocess() and move all preprocessing code in paint_all() to it. - Add window flag support but currently unused. - Add DamageNotify handling to ev_window(). - I'm considering removing HAS_NAME_WINDOW_PIXMAP = 0 support as I couldn't see what it is good for. Nor do I know what CAN_DO_USABLE does. Basically all my changes ignore these cases.
- Loading branch information
778a8b1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice. I can already see 2 very minor bugs this fixed with Awesome. It does seem to use a little bit more CPU, but that might be acceptable.
778a8b1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder how you are profiling compton. It looks really hard to profile as its resource consumption depends on user behaviors, and too much work is done on the X side.
By the way please look into #43 if you are interested. The problem sounds puzzling.
778a8b1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing scientific. This is just my first impression after a few minutes of using it. It might be the power of suggestion plus me staring at the cpu usage while swapping between two fading workspaces. This is really good work though. I've been running the latest commits for only a few hours now, and a lot of little annoyances that weren't worth describing before have disappeared.
778a8b1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. :-)
Unless you see more fading effects (which means more requests to X to generate
alpha_pict
,shadow_pict
, andframe_alpha_pict
), the performance impact won't be very noticeable, I bet. (Okay, and unless you are running it on Raspberry Pi, or have over one hundred windows on each workspace. :-) ) This commit removes the need to maintain a separate fading queue, but calculates opacity changes on every window in the window linked list. It at most would add 500 instructions to be executed on each paint, my guess is. Don't be too scared.