Commit graph

75 commits

Author SHA1 Message Date
Dana Jansens
4a9b25ad58 give the compiler hints about what can be kept in registers so that it can optimize the gradient code better with all the pointers going on 2008-10-27 00:27:50 +01:00
Mikael Magnusson
c716d1788b Remove double newlines. 2008-03-08 17:41:52 +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
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
9a93350aa7 make horizontal gradients faster by not jumping around in memory as much 2008-01-27 04:25:09 -05: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
89ade7a8c1 don't alloc/free colors every time splitvertical is drawn 2007-06-13 13:48:00 +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
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
51626b787d unused variables 2007-06-04 18:42:14 +00:00
Mikael Magnusson
3a89939c2d allow effects on parentrelative textures, ie bevels and interlaces and borders 2007-06-04 16:03:43 +00:00
Dana Jansens
2442cdfd85 1) translate all of openbox's output
2) update copyrights.
3) make release. ok that part not quite yet.
2007-04-23 17:56:35 +00:00
Dana Jansens
07fe0980be declare variables at the beginning of blocks, because it is nice to do so. and polite? 2007-03-02 22:11:46 +00:00
Mikael Magnusson
6930bdb289 fix a crash when using mirrorhorizontal and resizing a window to width 1 2006-09-07 11:40:01 +00:00
Mikael Magnusson
766e7ae9bf rename osx to mirrorhorizontal and split to splitvertical, this will make all themes that used them not look right so update them 2006-08-24 17:57:01 +00:00
Mikael Magnusson
d9f14c1d01 update copyright step 2 2006-08-22 16:44:18 +00:00
Mikael Magnusson
e8c19d0c99 patch from thorsten vollmer to fix bug #2506, interlaces and bevels not drawing correctly 2006-08-20 07:15:18 +00:00
Mikael Magnusson
50292dbd75 a "osx" gradient, it is like horizontal but mirrors in the center 2006-08-01 20:34:35 +00:00
Mikael Magnusson
b3fa579a61 so it wont leak because ob uses a hash for colors, but lets free the colors anyway 2006-06-14 19:47:28 +00:00
Mikael Magnusson
7ca93b9ff2 okay that parent didnt point where i thought 2006-06-14 19:27:32 +00:00
Mikael Magnusson
18cd2fa938 forgot i was in the middle of something 2006-06-14 19:23:27 +00:00
Mikael Magnusson
335a0eecc7 initial commit of split gradient, looks like some RrColor leaking perhaps 2006-06-14 19:20:46 +00:00
Dana Jansens
740c5b2a20 consistant glib type usage 2003-10-15 03:59:35 +00:00
Dana Jansens
16f46c296d no tabs 2003-09-17 07:44:49 +00:00
Dana Jansens
c4e4760c41 add copyright headers, adjust --version output to include copyright, and --help output to not include version output. 2003-09-17 07:32:52 +00:00
Dana Jansens
72f3195821 interlace is drawn first, so bevels n shit cover it 2003-09-02 19:16:56 +00:00
Dana Jansens
e91814e99f add interlaceColor, and support interlaced gradients 2003-09-01 03:10:47 +00:00
Dana Jansens
6e86a42c4b use RrColorGC 2003-08-31 17:02:10 +00:00
Dana Jansens
08f1f213f1 split the increment into a separate macro 2003-08-05 10:51:19 +00:00
Dana Jansens
3a26c8aa8e move the dekstop file to data/ 2003-08-01 15:00:22 +00:00
Dana Jansens
5be0a82a35 use ob_debug for any debug printing and only display the output when its a debug build or when --debug is passed to it 2003-07-24 06:02:38 +00:00
Dana Jansens
230abdc5a0 draw the bevel stuff in the pixel data buffer so parent-relative stuff can use it. 2003-07-24 05:33:41 +00:00
Dana Jansens
9d896233ec missed setting 'current' at the end of the pyramid gradient 2003-06-29 08:33:19 +00:00
Dana Jansens
5cd0ed57ac do horz grads without any multipliaction 2003-06-24 18:56:47 +00:00
Dana Jansens
1e882b6271 made all the gradients work with integer math. removed the pipecross and rectangle gradietns tho cuz they are ugly and i dont want to code that bullshit cuz they are ugly. 2003-06-24 18:54:18 +00:00
Dana Jansens
dc60657acf integer math for gradients. horz vert and diags and pipecross work so far. 2003-06-24 18:16:23 +00:00
Dana Jansens
bb6b616b9c more namespacing with Rr* 2003-06-21 02:39:55 +00:00
Dana Jansens
33ec08ea22 more namespacing with Rr* 2003-06-21 02:30:14 +00:00
Dana Jansens
c100b72c5d more namespacing with Rr* 2003-06-21 02:26:50 +00:00
Dana Jansens
092616de9a rename pixel32/16 to RrPixel32/16 2003-06-21 02:00:42 +00:00
Dana Jansens
3f32dfa87e this is going to break the kernel/ building.
lots of modifications to the render API, prefixing everything, making proper
names for everything. the structures are not hidden/opaque yet, but the naming scheme of the public API works much better now.
2003-06-20 07:58:51 +00:00