Commit graph

469 commits

Author SHA1 Message Date
Dana Jansens
66a897d9b2 don't reference free'd memory, and don't leak memory if the image cache is not saving any resized pictures 2008-02-14 15:10:14 -05:00
Dana Jansens
e7a86f5fe4 use g_message not g_print so it can go to the log 2008-02-14 15:10:14 -05:00
Dana Jansens
38c96413b3 pre-calc the sum of a picture added to an RrImage rather than calculating it every time 2008-02-14 15:10:14 -05:00
Dana Jansens
a2e3026d8a add a bunch of comments for images and image caches. and make the number of resized pictures saved in an image tunable per-icon cache. 2008-02-14 15:10:14 -05:00
Dana Jansens
35b36fc377 when resizing images, pick a source image with the same aspect ratio if possible 2008-02-14 15:10:14 -05:00
Dana Jansens
4c7cc1cfa6 Introducing the icon cache.
If an icon is the same as one in the cache, then it uses that one.
icons of different sizes (from the same client) are linked together into
one, and resizes of icons are cached and linked to all the various sizes.
so you only need one icon in memory for all your terminals now. ya!
2008-02-14 15:09:24 -05:00
Dana Jansens
512d93afcc backport the changes to render/ from the alttab branch (commit 3592046b2b) in master, as the iconcache changes depend on this
git show 3592046b -- render
2008-02-14 14:44:17 -05:00
Mikael Magnusson
e06ddf9f22 put the char member at the bottom of the struct so that it doesnt mess up alignment for the other members (assuming the compiler doesn't pad the struct appropriately anyways) 2008-02-14 14:35:28 -05:00
Dana Jansens
baf1a0919d fix min-size calculations for lineart textures 2008-02-14 14:24:37 -05:00
Dana Jansens
0da49e82ae when drawing and measuring strings in "flow" mode, don't ellipsize so that lines can wrap 2008-02-14 14:24:37 -05:00
Dana Jansens
7867ced622 allow font rendering to use multiple lines 2008-02-14 14:24:07 -05:00
Dana Jansens
c313b219a2 you can create dialog windows called "prompts" which have a message and some buttons! they don't do anything interesting yet. 2008-02-14 14:24:07 -05:00
Dana Jansens
8f5540f76d turn the new openbox.png into the default icon.h 2008-02-14 19:40:03 +01:00
Dana Jansens
8186a81fe0 split menu overlap into x and y components 2008-02-14 19:40:02 +01:00
Dana Jansens
6bda8c2903 speed up the pyramid gradient using memcpy's. also make it not crash for 1px high textures.
here are some sample profiling results.  pyramid2 is the new code

  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name

 58.78      1.54     1.54      255     6.04     6.04  gradient_pyramid1
 40.46      2.60     1.06      255     4.16     4.16  gradient_pyramid2

 54.88      2.25     2.25      504     4.46     4.46  gradient_pyramid1
 44.88      4.09     1.84      504     3.65     3.65  gradient_pyramid2
2008-02-14 19:40:02 +01:00
Dana Jansens
b92cb6a08a remove an XXX comment, the sanity check seems to have worked out fine. 2008-02-14 19:40:02 +01:00
Dana Jansens
9c72998684 a small optimization for the vertical gradients, and use the same log(n) strategy to use less memcpy's for filling out the horizontal gradients 2008-02-14 19:40:02 +01:00
Dana Jansens
3611c8210c use memcpy's to speed up vertical gradients too. split the fancy memcpy() code out into the repeat_pixel function. 2008-02-14 19:40:02 +01:00
Dana Jansens
1d00d99470 use memcpy's to make splitvertical gradient much faster - using log n memcpy's is much quicker than setting a pointer value n times
Here are some profiling results.  splitvertical1 is the original code, splitvertical2 is some slight improvements in locality for it, and splitvertical3 is the new O(log n) memcpy code

  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
 49.44      0.88     0.88     1063     0.83     0.83  gradient_splitvertical1
 47.19      1.72     0.84     1063     0.79     0.79  gradient_splitvertical2
  2.81      1.77     0.05     1063     0.05     0.05  gradient_splitvertical3

i also tested this with 'time' to draw 1000 gradients, and the new code used approximately half the user time, and finished 10 seconds quicker.  so yeah, it's magical and works well.
2008-02-14 19:40:02 +01:00
Dana Jansens
ed81992aea make rendertest exit cleanly when it is unmapped (iconify/desktopchange) 2008-02-14 19:40:01 +01:00
Dana Jansens
f0d31a52b7 make white font shadows (negative shadowtint) work right.. this has been busted a long time. thank you nvidia. 2008-02-10 01:52:08 -05:00
Dana Jansens
87fd759ba9 the title_focused_shadow_color is being set twice, and being overridden by the osd color (though not in the texture) 2008-02-05 00:09:51 -05:00
Dana Jansens
9a93350aa7 make horizontal gradients faster by not jumping around in memory as much 2008-01-27 04:25:09 -05:00
Mikael Magnusson
1d9991a0cd Fix some memleaks.
missing RrFontClose for osd_font in two places.
missing a g_free(area);
2008-01-25 13:29:46 +01:00
Mikael Magnusson
0be98fee47 Various fixes for sparse warnings.
Define void functions with (void), not ().
Add missing includes.
Some functions were declared static but defined non-static.
Some variables that should be file static were file global but not used in any other file.
prop.h defined a new prop_atoms in each file that included it instead of declaring it extern.
2008-01-16 15:35:25 +01:00
Dana Jansens
fb1d6d9e46 Bug 3359 - redundant pango flags 2008-01-11 14:48:21 -05:00
Mikael Magnusson
9b803f4755 Fix using None when it should be NULL 2007-09-04 06:25:31 +02:00
Mikael Magnusson
1492bd0e7d Fix shadowed variables 2007-09-04 06:25:06 +02:00
Dana Jansens
fe08a60665 add a comment 2007-08-05 21:14:38 -04:00
Mikael Magnusson
7f53478977 Fix some memleaks 2007-08-06 03:09:55 +02:00
Dana Jansens
a5c6eb81ad let you specify the padding y and x independently 2007-08-04 12:13:10 -04:00
Mikael Magnusson
77baf26a7f remove trailing whitespace 2007-07-17 02:48:16 +02:00
Mikael Magnusson
8ad51aef1e 80 cols everywhere 2007-07-14 15:22:35 +02:00
Dana Jansens
0bfe6c1e52 no more crash in splitvertical. i think i changed the size of the middle gradient too. it's always 1px now unless the texture is very small, then it can be 0. if theres a discrepency, the bottom color gets the extra pixel. 2007-07-11 14:17:34 +00:00
Dana Jansens
b70afd1016 let the theme specify all splitgradient colors 2007-06-13 14:03:46 +00:00
Dana Jansens
89ade7a8c1 don't alloc/free colors every time splitvertical is drawn 2007-06-13 13:48:00 +00:00
Dana Jansens
fc2e419a8a put new things at the bottom of the struct 2007-06-10 23:07:36 +00:00
Dana Jansens
94a2a4d67e let the shadow be 0-256 2007-06-10 21:56:50 +00:00
Dana Jansens
6b05306a28 don't limit the highlight at all 2007-06-10 21:55:09 +00:00
Dana Jansens
89b7311d8d make bevel strengths theme-selectable 2007-06-10 21:38:29 +00:00
Mikael Magnusson
2440549aba wrongly indented line 2007-06-09 01:28:00 +00:00
Dana Jansens
62a652f6f5 fix when 1or2px splitvertical 2007-06-09 01:22:34 +00:00
Dana Jansens
44fa95eea8 no crashing in splitvertical 2007-06-09 01:18:19 +00:00
Dana Jansens
b60e471705 middle gradient in splitvertical 2007-06-09 01:08:25 +00:00
Dana Jansens
6dec1c213b yay. toggled textures and colors for all states. 2007-06-08 22:14:48 +00:00
Mikael Magnusson
96bb892054 back xml themes out of trunk 2007-06-07 23:46:28 +00:00
Dana Jansens
1fc480c193 make active-disabled shadow offset-y be proper 2007-06-06 14:53:57 +00:00
Dana Jansens
0ba396fea0 fix parentrel bevels 2007-06-05 20:37:10 +00:00
Dana Jansens
4548d40c0d combine the parent and child textures in fun ways when a parentrelative texture with a bevel is placed right overtop of another texture with a bevel 2007-06-05 18:01:10 +00:00
Dana Jansens
8349e4ca6b add osd border stuff 2007-06-05 15:57:27 +00:00